diff options
author | francis <francis> | 2008-03-06 14:15:41 +0000 |
---|---|---|
committer | francis <francis> | 2008-03-06 14:15:41 +0000 |
commit | c1099db3212c200a60ad7835589cfb636e975728 (patch) | |
tree | cd8cd119cad0c486e0fa890bc1b6ae0095ba8566 /spec/controllers/general_controller_spec.rb | |
parent | f7164bb8fdc075d133f98b5c7fc789493648dc8e (diff) |
Fix up tests.
Diffstat (limited to 'spec/controllers/general_controller_spec.rb')
-rw-r--r-- | spec/controllers/general_controller_spec.rb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/controllers/general_controller_spec.rb b/spec/controllers/general_controller_spec.rb new file mode 100644 index 000000000..ab2a0eb60 --- /dev/null +++ b/spec/controllers/general_controller_spec.rb @@ -0,0 +1,26 @@ +require File.dirname(__FILE__) + '/../spec_helper' + +describe GeneralController, "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_id] = users(:bob_smith_user).id + get :frontpage + response.should have_tag('a', "Sign out") + end + + +end + + |