Sha256: c7fe9f5188957eb1a1fbe1f5e2322122fdbb52a2f6ae1451238fe1c8972405a1

Contents?: true

Size: 560 Bytes

Versions: 16

Compression:

Stored size: 560 Bytes

Contents

require 'facets/uri'
require 'test/unit'

class TC_Uri < Test::Unit::TestCase

  def test_hash_to_query
    h = { :a=>1, :b=>2 }
    r = URI.hash_to_query(h)
    assert(r == "a=1;b=2" || r == "b=2;a=1")
  end

end


class TC_Kernel < Test::Unit::TestCase

  def test_uri
    assert_equal( uri("abc?xyz"), "abc%3Fxyz" )
  end

  def test_unuri
    assert_equal( unuri("abc%3Fxyz"), "abc?xyz" )
  end

end


class TC_Hash < Test::Unit::TestCase

  def test_to_uri
    h = { :a=>1, :b=>2 }
    r = h.to_uri
    assert(r == "a=1;b=2" || r == "b=2;a=1")
  end

end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
facets-2.8.4 test/more/test_uri.rb
facets-2.8.3 test/more/test_uri.rb
facets-2.8.2 test/more/test_uri.rb
facets-2.8.1 test/more/test_uri.rb
facets-2.8.0 test/more/test_uri.rb
facets-2.7.0 test/more/test_uri.rb
facets-2.6.0 test/more/test_uri.rb
facets-2.4.0 test/test_uri.rb
facets-2.4.1 test/test_uri.rb
facets-2.4.3 test/more/test_uri.rb
facets-2.4.4 test/more/test_uri.rb
facets-2.4.2 test/more/test_uri.rb
facets-2.5.1 test/more/test_uri.rb
facets-2.4.5 test/more/test_uri.rb
facets-2.5.0 test/more/test_uri.rb
facets-2.5.2 test/more/test_uri.rb