Add empty pd declaration page
This commit is contained in:
parent
2074e9dce2
commit
62b70f45bc
6 changed files with 49 additions and 1 deletions
29
test/controllers/accounts/pd_declarations_controller_test.rb
Normal file
29
test/controllers/accounts/pd_declarations_controller_test.rb
Normal file
|
@ -0,0 +1,29 @@
|
|||
require "test_helper"
|
||||
|
||||
module Accounts
|
||||
class PdDeclarationsControllerTest < ActionDispatch::IntegrationTest
|
||||
##
|
||||
# test all routes which lead to this controller
|
||||
def test_routes
|
||||
assert_routing(
|
||||
{ :path => "/account/pd_declaration", :method => :get },
|
||||
{ :controller => "accounts/pd_declarations", :action => "show" }
|
||||
)
|
||||
end
|
||||
|
||||
def test_show_not_logged_in
|
||||
get account_pd_declaration_path
|
||||
|
||||
assert_redirected_to login_path(:referer => account_pd_declaration_path)
|
||||
end
|
||||
|
||||
def test_show_agreed
|
||||
user = create(:user)
|
||||
session_for(user)
|
||||
|
||||
get account_pd_declaration_path
|
||||
|
||||
assert_response :success
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue