From c7f66ee647c9ab4c19f71e7950a271a8bed2d4e0 Mon Sep 17 00:00:00 2001
From: Florian Staudacher <florian_staudacher@yahoo.de>
Date: Wed, 25 Jul 2012 15:22:53 +0200
Subject: [PATCH] add specs for #3464

---
 spec/controllers/invitations_controller_spec.rb | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/spec/controllers/invitations_controller_spec.rb b/spec/controllers/invitations_controller_spec.rb
index db24455e34..300ab78af5 100644
--- a/spec/controllers/invitations_controller_spec.rb
+++ b/spec/controllers/invitations_controller_spec.rb
@@ -78,4 +78,18 @@ describe InvitationsController do
       get :new
     end
   end
+
+  describe 'redirect logged out users to the sign in page' do
+    it 'redriects #new' do
+      get :new
+      response.should be_redirect
+      response.should redirect_to new_user_session_path
+    end
+
+    it 'redirects #create' do
+      post :create
+      response.should be_redirect
+      response.should redirect_to new_user_session_path
+    end
+  end
 end
-- 
GitLab