Sha256: 37479dd1053db7befbec1850a41eee00e52e88fffe2f13fbbe7437a163bd4064

Contents?: true

Size: 736 Bytes

Versions: 8

Compression:

Stored size: 736 Bytes

Contents

require 'spec_helper'

describe "Sunrise Manager Dashboard" do
  subject { page }
  before(:all) do 
    @admin = FactoryGirl.create(:admin_user, :email => "#{Time.now.to_i}@gmail.com")    

    @post = FactoryGirl.create(:post)
    @user = FactoryGirl.create(:redactor_user)
  end

  context "admin" do
    before(:each) { login_as @admin }

    describe "GET /manage" do
      before(:each) do 
        visit dashboard_path
      end
      
      it "should show page title" do
        should have_content "Dashboard"
      end
    end
  end
  
  describe "anonymous user" do
    before(:each) do
      visit dashboard_path
    end
    
    it "should redirect to login page" do
      should have_content('Sign in')
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
sunrise-cms-1.0.6 spec/requests/dashboard_spec.rb
sunrise-cms-1.0.5 spec/requests/dashboard_spec.rb
sunrise-cms-1.0.4 spec/requests/dashboard_spec.rb
sunrise-cms-1.0.3 spec/requests/dashboard_spec.rb
sunrise-cms-1.0.2 spec/requests/dashboard_spec.rb
sunrise-cms-1.0.1 spec/requests/dashboard_spec.rb
sunrise-cms-1.0.0 spec/requests/dashboard_spec.rb
sunrise-cms-1.0.0.rc3 spec/requests/dashboard_spec.rb