From fbf92b17a092daf783897b92a798953d9db6a817 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Mon, 25 Nov 2013 21:10:56 +0000 Subject: [PATCH] Add test for redirect routes --- test/integration/redirect_test.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 test/integration/redirect_test.rb diff --git a/test/integration/redirect_test.rb b/test/integration/redirect_test.rb new file mode 100644 index 000000000..604cebd76 --- /dev/null +++ b/test/integration/redirect_test.rb @@ -0,0 +1,19 @@ +require File.dirname(__FILE__) + '/../test_helper' + +class RedirectTest < ActionDispatch::IntegrationTest + def test_history_redirects + get "/browse" + assert_response :redirect + assert_redirected_to "/history" + + get "/browse/changesets" + assert_response :redirect + assert_redirected_to "/history" + end + + def test_history_feed_redirects + get "/browse/changesets/feed" + assert_response :redirect + assert_redirected_to "/history/feed" + end +end -- 2.39.5