diff options
Diffstat (limited to 'spec/controllers/request_controller_spec.rb')
-rw-r--r-- | spec/controllers/request_controller_spec.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb index 3a4bc0a36..22965871c 100644 --- a/spec/controllers/request_controller_spec.rb +++ b/spec/controllers/request_controller_spec.rb @@ -1,5 +1,28 @@ require File.dirname(__FILE__) + '/../spec_helper' +describe RequestController, "when showing the front page" do + integrate_views + fixtures :users + + it "should be successful" do + get :frontpage + response.should be_success + end + + it "should have sign in/up link when not signed in" do + get :frontpage + response.should have_tag('a', "Sign in or sign up") + end + + it "should have sign out link when signed in" do + session[:user] = users(:bob_smith_user) + get :frontpage + response.should have_tag('a', "Sign out") + end + + +end + describe RequestController, "when listing all requests" do fixtures :info_requests |