Sha256: 2fa1e171a6badcc69eab5d755fc8df0c4de55f1a99f6b78aa7543d6087a876b8

Contents?: true

Size: 339 Bytes

Versions: 14

Compression:

Stored size: 339 Bytes

Contents

require 'test_helper'

class MonkeyPatchTest < Test::Unit::TestCase
  should "convert a hash to a valid url parameter string" do
    h1 = { :foo => 1, :bar => 2, :baz => 3 }
    assert_equal h1.to_url, 'foo=1&bar=2&baz=3'

    h2 = { :foo => "What's up Doc", :bar => "1" }
    assert_equal h2.to_url, "foo=What%27s+up+Doc&bar=1"
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
alexmchale-commerce-bank-client-0.10.0 test/monkeypatch_test.rb
alexmchale-commerce-bank-client-0.4.0 test/monkeypatch_test.rb
alexmchale-commerce-bank-client-0.4.3 test/monkeypatch_test.rb
alexmchale-commerce-bank-client-0.4.4 test/monkeypatch_test.rb
alexmchale-commerce-bank-client-0.5.0 test/monkeypatch_test.rb
alexmchale-commerce-bank-client-0.6.0 test/monkeypatch_test.rb
alexmchale-commerce-bank-client-0.6.1 test/monkeypatch_test.rb
alexmchale-commerce-bank-client-0.6.2 test/monkeypatch_test.rb
alexmchale-commerce-bank-client-0.8.0 test/monkeypatch_test.rb
alexmchale-commerce-bank-client-0.9.0 test/monkeypatch_test.rb
commerce-bank-client-1.2.0 test/monkeypatch_test.rb
commerce-bank-client-1.1.1 test/monkeypatch_test.rb
commerce-bank-client-1.1.0 test/monkeypatch_test.rb
commerce-bank-client-1.0.0 test/monkeypatch_test.rb