File: test_signature.rb

package info (click to toggle)
ruby-oauth 0.5.4-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 584 kB
  • sloc: ruby: 4,070; makefile: 4
file content (15 lines) | stat: -rw-r--r-- 503 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# -*- encoding: utf-8 -*-

require File.expand_path('../../test_helper', __FILE__)

class TestOauth < Minitest::Test

  def test_parameter_escaping_kcode_invariant
    %w(n N e E s S u U).each do |kcode|
      assert_equal '%E3%81%82', OAuth::Helper.escape('あ'),
                    "Failed to correctly escape Japanese under $KCODE = #{kcode}"
      assert_equal '%C3%A9', OAuth::Helper.escape('é'),
                    "Failed to correctly escape e+acute under $KCODE = #{kcode}"
    end
  end
end