aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/general_controller_spec.rb
blob: ab2a0eb60d6a5367b7d3737664f96dca1222d1ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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