Sha256: 9e4f5f94f15d8b33ab82fb9f763cb4b7a1d948a1f9e2337e282e6d7fbac59243

Contents?: true

Size: 796 Bytes

Versions: 5

Compression:

Stored size: 796 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 "/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 "/items/1?a=A&b=B", req.path

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

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rufus-verbs-0.4 test/dryrun_test.rb
rufus-verbs-0.5 test/dryrun_test.rb
rufus-verbs-0.1 test/dryrun_test.rb
rufus-verbs-0.2 test/dryrun_test.rb
rufus-verbs-0.3 test/dryrun_test.rb