]> git.openstreetmap.org Git - rails.git/blob - test/controllers/relation_members_controller_test.rb
Add frozen_string_literal comments to ruby files
[rails.git] / test / controllers / relation_members_controller_test.rb
1 # frozen_string_literal: true
2
3 require "test_helper"
4
5 class RelationMembersControllerTest < ActionDispatch::IntegrationTest
6   ##
7   # test all routes which lead to this controller
8   def test_routes
9     assert_routing(
10       { :path => "/relation/1/members", :method => :get },
11       { :controller => "relation_members", :action => "show", :id => "1" }
12     )
13   end
14
15   def test_show_with_members
16     relation = create(:relation)
17     get relation_members_path(relation)
18     assert_response :success
19   end
20
21   def test_show_not_found
22     get relation_members_path(0)
23
24     assert_response :not_found
25   end
26
27   def test_show_timeout
28     relation = create(:relation)
29
30     with_settings(:web_timeout => -1) do
31       get relation_members_path(relation, 1)
32     end
33
34     assert_response :error
35   end
36 end