Sha256: d668b055d0a0276869df25bc59c1f191b6c43a26a379d99efaac96b088231f21

Contents?: true

Size: 998 Bytes

Versions: 42

Compression:

Stored size: 998 Bytes

Contents

require 'spec_helper'

describe "Sunrise Manager New" do
  subject { page }
  before(:all) do
    @admin = FactoryGirl.create(:admin_user)
    
    @root = FactoryGirl.create(:structure_main)
    @page = FactoryGirl.create(:structure_page, :parent => @root)
  end

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

    describe "GET /manage/structures/1" do
      before(:each) do
        visit show_path(:model_name => "structures", :id => @page.id)
      end
      
      it "should show page title" do
        should have_content( @page.title )
      end
      
      it "should display configured fields to show" do
        SunriseStructure.config.show.fields.each do |f|
          should have_content f.human_name
        end
      end
    end
  end
  
  describe "anonymous user" do
    before(:each) do
      visit show_path(:model_name => "structures", :id => @page.id)
    end
    
    it "should redirect to login page" do
      should have_content('Sign in')
    end
  end
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
sunrise-cms-1.0.6 spec/requests/manager/default/show_spec.rb
sunrise-cms-1.0.5 spec/requests/manager/default/show_spec.rb
sunrise-cms-1.0.4 spec/requests/manager/default/show_spec.rb
sunrise-cms-1.0.3 spec/requests/manager/default/show_spec.rb
sunrise-cms-1.0.2 spec/requests/manager/default/show_spec.rb
sunrise-cms-1.0.1 spec/requests/manager/default/show_spec.rb
sunrise-cms-1.0.0 spec/requests/manager/default/show_spec.rb
sunrise-cms-1.0.0.rc3 spec/requests/manager/default/show_spec.rb
sunrise-cms-1.0.0.rc2 spec/requests/manager/default/show_spec.rb
sunrise-cms-1.0.0.rc1 spec/requests/manager/default/show_spec.rb
sunrise-cms-0.7.0.rc2 spec/requests/manager/default/show_spec.rb
sunrise-cms-0.7.0.rc1 spec/requests/manager/default/show_spec.rb
sunrise-cms-0.6.11 spec/requests/manager/default/show_spec.rb
sunrise-cms-0.6.10 spec/requests/manager/default/show_spec.rb
sunrise-cms-0.6.9 spec/requests/manager/default/show_spec.rb
sunrise-cms-0.6.8 spec/requests/manager/default/show_spec.rb
sunrise-cms-0.6.7 spec/requests/manager/default/show_spec.rb
sunrise-cms-0.6.6 spec/requests/manager/default/show_spec.rb
sunrise-cms-0.6.5 spec/requests/manager/default/show_spec.rb
sunrise-cms-0.6.4 spec/requests/manager/default/show_spec.rb