added test for admin inviter
This commit is contained in:
parent
757c9169fc
commit
ad8ccbbeb9
1 changed files with 6 additions and 1 deletions
|
|
@ -102,9 +102,14 @@ describe AdminsController do
|
|||
|
||||
it 'succeeds' do
|
||||
get :admin_inviter, :identifier => 'bob@moms.com'
|
||||
response.should be_ok
|
||||
response.should be_redirect
|
||||
end
|
||||
|
||||
it 'does not die if you do it twice' do
|
||||
get :admin_inviter, :identifier => 'bob@moms.com'
|
||||
get :admin_inviter, :identifier => 'bob@moms.com'
|
||||
response.should be_redirect
|
||||
end
|
||||
it 'invites a new user' do
|
||||
Invitation.should_receive(:create_invitee).with(:service => 'email', :identifier => 'bob@moms.com')
|
||||
get :admin_inviter, :identifier => 'bob@moms.com'
|
||||
|
|
|
|||
Loading…
Reference in a new issue