Sha256: 9300b53ca1bb632c24b26988172df27cbb3a3b33f8a6b4f6a1198a0dd9af21d8

Contents?: true

Size: 717 Bytes

Versions: 5

Compression:

Stored size: 717 Bytes

Contents

#
# Testing rufus-verbs
#
# jmettraux@gmail.com
#
# Tue Feb 12 23:10:54 JST 2008
#

require 'test/unit'

require 'rufus/verbs'


class EscapeTest < Test::Unit::TestCase

    include Rufus::Verbs


    def test_0

        req = put(
            :dry_run => true, 
            :uri => "http://localhost:7777/items/1", 
            :query => { "a" => "hontou ni ?" })

        assert_equal "/items/1?a=hontou%20ni%20?", req.path

        req = put(
            :dry_run => true, 
            :uri => "http://localhost:7777/items/1", 
            :params => { "a" => "hontou ni ?" },
            :no_escape => true)

        assert_equal "/items/1?a=hontou ni ?", req.path
            # would fail anyway...
    end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rufus-verbs-0.9 test/escape_test.rb
rufus-verbs-0.8 test/escape_test.rb
rufus-verbs-0.6 test/escape_test.rb
rufus-verbs-0.7 test/escape_test.rb
rufus-verbs-0.10 test/escape_test.rb