1 require File.dirname(__FILE__) + '/../test_helper'
3 class RedirectTest < ActionDispatch::IntegrationTest
4 def test_history_redirects
6 assert_response :redirect
7 assert_redirected_to "/history"
9 get "/browse/changesets"
10 assert_response :redirect
11 assert_redirected_to "/history"
14 assert_response :redirect
15 assert_redirected_to "/history/friends"
18 assert_response :redirect
19 assert_redirected_to "/history/nearby"
21 get "/user/name/edits"
22 assert_response :redirect
23 assert_redirected_to "/user/name/history"
26 def test_history_feed_redirects
27 get "/browse/changesets/feed"
28 assert_response :redirect
29 assert_redirected_to "/history/feed"
31 get "/user/name/edits/feed"
32 assert_response :redirect
33 assert_redirected_to "/user/name/history/feed"
36 def test_browse_redirects
38 assert_response :redirect
39 assert_redirected_to "/node/1"
42 assert_response :redirect
43 assert_redirected_to "/way/1"
45 get "/browse/relation/1"
46 assert_response :redirect
47 assert_redirected_to "/relation/1"
49 get "/browse/changeset/1"
50 assert_response :redirect
51 assert_redirected_to "/changeset/1"
54 assert_response :redirect
55 assert_redirected_to "/note/1"
58 def test_browse_history_redirects
59 get "/browse/node/1/history"
60 assert_response :redirect
61 assert_redirected_to "/node/1/history"
63 get "/browse/way/1/history"
64 assert_response :redirect
65 assert_redirected_to "/way/1/history"
67 get "/browse/relation/1/history"
68 assert_response :redirect
69 assert_redirected_to "/relation/1/history"