mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 23:30:12 +01:00
add test coverage for when we don't have any users
It wasn't being covered in the functional test for this controller.
This commit is contained in:
parent
7c5028f227
commit
66827d0640
1 changed files with 7 additions and 0 deletions
|
|
@ -87,6 +87,13 @@ class UsersControllerTest < ActionController::TestCase
|
|||
# Signup and creation of new users
|
||||
# ============================================
|
||||
|
||||
def test_with_no_users
|
||||
User.expects(:no_users_yet?).returns(true)
|
||||
get :new
|
||||
assert_match assigns['heading'], /get started/
|
||||
assert_not_nil assigns[:user]
|
||||
end
|
||||
|
||||
def test_create_adds_a_new_nonadmin_user
|
||||
login_as :admin_user
|
||||
post :create, :user => {:login => 'newbie', :password => 'newbiepass', :password_confirmation => 'newbiepass'}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue