4 class PdDeclarationsControllerTest < ActionDispatch::IntegrationTest
6 # test all routes which lead to this controller
9 { :path => "/account/pd_declaration", :method => :get },
10 { :controller => "accounts/pd_declarations", :action => "show" }
13 { :path => "/account/pd_declaration", :method => :post },
14 { :controller => "accounts/pd_declarations", :action => "create" }
18 def test_show_not_logged_in
19 get account_pd_declaration_path
21 assert_redirected_to login_path(:referer => account_pd_declaration_path)
28 get account_pd_declaration_path
30 assert_response :success
33 def test_create_not_logged_in
34 post account_pd_declaration_path
36 assert_response :forbidden
43 post account_pd_declaration_path
45 assert_redirected_to edit_account_path