Sha256: daa1ca470e311747ca2e27a5c08606c55324c84605899ae6d15c1557ffa360ce

Contents?: true

Size: 663 Bytes

Versions: 2

Compression:

Stored size: 663 Bytes

Contents

#
# Testing rufus-verbs
#
# jmettraux@gmail.com
#
# Sun Jan 13 20:02:25 JST 2008
#


require File.dirname(__FILE__) + '/base.rb'


class RedirTest < Test::Unit::TestCase
  include TestBaseMixin

  include Rufus::Verbs


  def test_0

    expect 200, {}, get(:uri => "http://localhost:7777/things")
  end

  #
  # testing the :no_redirections directive
  #
  def test_1

    res = get "http://localhost:7777/things", :no_redirections => true
    assert_equal 303, res.code.to_i

    res = get("http://localhost:7777/things", :noredir => true)
    assert_equal 303, res.code.to_i

    expect 200, {}, get("http://localhost:7777/items", :noredir => true)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rufus-verbs-1.0.1 test/redir_test.rb
rufus-verbs-1.0.0 test/redir_test.rb