From ad8ccbbeb9653fd2ab7b275c87fcd8dc63d952cb Mon Sep 17 00:00:00 2001
From: Maxwell Salzberg <maxwell@joindiaspora.com>
Date: Wed, 13 Jul 2011 15:09:18 -0700
Subject: [PATCH] added test for admin inviter

---
 spec/controllers/admins_controller_spec.rb | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/spec/controllers/admins_controller_spec.rb b/spec/controllers/admins_controller_spec.rb
index 6b30aa8bfe..5585f88985 100644
--- a/spec/controllers/admins_controller_spec.rb
+++ b/spec/controllers/admins_controller_spec.rb
@@ -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'
-- 
GitLab