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:
Matt Rogers 2013-03-03 13:55:11 -06:00
parent 7c5028f227
commit 66827d0640

View file

@ -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'}