Sha256: fa36f5b07fe6dae08ecf6085fefa289aa53ec181e02f8b53966efbebe4bb7e2a

Contents?: true

Size: 820 Bytes

Versions: 3

Compression:

Stored size: 820 Bytes

Contents

#
# Testing rufus-verbs
#
# jmettraux@gmail.com
#
# Tue Jan 15 09:26:45 JST 2008
#

require 'test/unit'

require 'rufus/verbs'


class DryRunTest < Test::Unit::TestCase

    include Rufus::Verbs


    def test_0

        req = put(
            :dry_run => true, 
            :uri => "http://localhost:7777/items/1", 
            :params => { "a" => "A", :b => :B })

        assert_equal "/items/1?a=A&b=B", req.path

        req = put(
            :dry_run => true, 
            :uri => "http://localhost:7777/items/1", 
            :query => { "a" => "A", :b => :B })

        assert_equal "/items/1?a=A&b=B", req.path

        req = put(
            "http://localhost:7777/items/1?a=A", :d => "toto", :dry_run => true)

        assert_equal "/items/1?a=A", req.path
        assert_equal "toto", req.body
    end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rufus-verbs-0.8 test/dryrun_test.rb
rufus-verbs-0.7 test/dryrun_test.rb
rufus-verbs-0.6 test/dryrun_test.rb