mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 23:30:12 +01:00
parent
4d2f25ab20
commit
c838272622
2 changed files with 18 additions and 2 deletions
|
|
@ -14,10 +14,25 @@ class StoriesTest < ActionController::IntegrationTest
|
|||
end
|
||||
|
||||
def test_signup_new_user_by_nonadmin
|
||||
SITE_CONFIG['open_signups'] = false
|
||||
other_user = new_session_as(:other_user,"sesame")
|
||||
other_user.goes_to_signup_as_nonadmin
|
||||
end
|
||||
|
||||
def test_open_signup_new_user
|
||||
SITE_CONFIG['open_signups'] = true
|
||||
get "/signup"
|
||||
assert_response :success
|
||||
assert_template "users/new"
|
||||
post "/users", :user => {:login => "newbie",
|
||||
:password => "newbiepass",
|
||||
:password_confirmation => "newbiepass"}
|
||||
assert_response :redirect
|
||||
follow_redirect!
|
||||
assert_response :success
|
||||
assert_template "todos/index"
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
module CustomAssertions
|
||||
|
|
@ -72,4 +87,4 @@ class StoriesTest < ActionController::IntegrationTest
|
|||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue