Sha256: 76d1d86610b131b1bda5ba3df397ba96c1cf33f2609ae99d3aeaf59f3962a3c4

Contents?: true

Size: 612 Bytes

Versions: 3

Compression:

Stored size: 612 Bytes

Contents

# coding: utf-8

require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')

class TestOauth < Test::Unit::TestCase

  def test_parameter_escaping_kcode_invariant
    old = $KCODE
    begin
      %w(n N e E s S u U).each do |kcode|
        $KCODE = 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
    ensure
      $KCODE = old
    end
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
qoobaa-oauth-0.3.8 test/test_signature.rb
drogus-oauth-0.3.7 test/test_signature.rb
drogus-oauth-0.3.6 test/test_signature.rb