test/system/rack_tests.rb in deas-0.9.0 vs test/system/rack_tests.rb in deas-0.10.0
- old
+ new
@@ -62,12 +62,21 @@
get '/redirect'
expected_location = 'http://google.com'
assert_equal 302, last_response.status
assert_equal expected_location, last_response.headers['Location']
+ end
- get '/redirect_to'
+ should "return a 302 redirect to the expected location " \
+ "when using a route redirect" do
+ get '/route_redirect'
expected_location = 'http://example.org/somewhere'
+
+ assert_equal 302, last_response.status
+ assert_equal expected_location, last_response.headers['Location']
+
+ get '/my_prefix/redirect'
+ expected_location = 'http://example.org/my_prefix/somewhere'
assert_equal 302, last_response.status
assert_equal expected_location, last_response.headers['Location']
end