Sha256: 3d926c16ec53ef98c3b7cf4a6508a372f3456bc501ef7a64aef38b412186eefa

Contents?: true

Size: 713 Bytes

Versions: 18

Compression:

Stored size: 713 Bytes

Contents

#
# testing rufus-jig
#
# Sun Nov  1 13:00:46 JST 2009
#

require File.join(File.dirname(__FILE__), 'base')


class UtHttpPrefixTest < Test::Unit::TestCase

  def setup
    @h = Rufus::Jig::Http.new('127.0.0.1', 4567, :prefix => '/a/b/')
  end
  def teardown
    @h.close
  end

  def test_get

    b = @h.get('c')

    assert_equal 'C', b

    assert_equal({"/a/b/c"=>["\"123456123456\"", "C"]}, @h.cache)
  end

  def test_put

    b = @h.put('c', 'data')

    assert_equal 201, @h.last_response.status
  end

  def test_post

    b = @h.post('c', 'data')

    assert_equal 201, @h.last_response.status
  end

  def test_delete

    b = @h.delete('c')

    assert_equal 200, @h.last_response.status
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
rufus-jig-0.1.23 test/ut_4_http_prefix.rb
rufus-jig-0.1.22 test/ut_4_http_prefix.rb
rufus-jig-0.1.21 test/ut_4_http_prefix.rb
rufus-jig-0.1.20 test/ut_4_http_prefix.rb
rufus-jig-0.1.19 test/ut_4_http_prefix.rb
rufus-jig-0.1.18 test/ut_4_http_prefix.rb
rufus-jig-0.1.17 test/ut_4_http_prefix.rb
rufus-jig-0.1.16 test/ut_4_http_prefix.rb
rufus-jig-0.1.15 test/ut_4_http_prefix.rb
rufus-jig-0.1.14 test/ut_4_http_prefix.rb
rufus-jig-0.1.13 test/ut_4_http_prefix.rb
rufus-jig-0.1.12 test/ut_4_http_prefix.rb
rufus-jig-0.1.11 test/ut_4_http_prefix.rb
rufus-jig-0.1.10 test/ut_4_http_prefix.rb
rufus-jig-0.1.9 test/ut_4_http_prefix.rb
rufus-jig-0.1.8 test/ut_4_http_prefix.rb
rufus-jig-0.1.7 test/ut_4_http_prefix.rb
rufus-jig-0.1.6 test/ut_4_http_prefix.rb