]> git.openstreetmap.org Git - rails.git/commitdiff
Add test for redirect routes
authorTom Hughes <tom@compton.nu>
Mon, 25 Nov 2013 21:10:56 +0000 (21:10 +0000)
committerTom Hughes <tom@compton.nu>
Mon, 25 Nov 2013 21:13:59 +0000 (21:13 +0000)
test/integration/redirect_test.rb [new file with mode: 0644]

diff --git a/test/integration/redirect_test.rb b/test/integration/redirect_test.rb
new file mode 100644 (file)
index 0000000..604cebd
--- /dev/null
@@ -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