Sha256: d4153b502fb761a1965a7ff2d7e971165f592fa1be6e4e5e215c4f6b1c68805a

Contents?: true

Size: 1.03 KB

Versions: 3

Compression:

Stored size: 1.03 KB

Contents

require "spec_helper"

describe "Section pages" do
	subject {page}

	let(:user) { Factory(:user) }
	before do 
		visit adminpanel.signin_path
		valid_signin(user)
	end
	
	describe "index" do
		let(:section) { Factory(:section_with_gallery) }
		before do
			visit adminpanel.sections_path
		end

		it { should have_link("i", adminpanel.section_path(section)) }
		it { should have_link("i", adminpanel.edit_section_path(section)) }
	end

	describe "show" do
		describe "with gallery" do
			let(:section) { Factory(:section_with_gallery) }
			let(:image) { Factory(:image_section, :foreign_key => section.id) }
			# let(:image2) { Factory(:image_section, :foreign_key => section.id) }
			# let(:image3) { Factory(:image_section, :foreign_key => section.id) }

			before do
				visit adminpanel.section_path(section)
			end

		    it { should have_title(section.name.humanize) }
		    it { should have_content(section.description) }
			it { should have_link("i", adminpanel.edit_section_path(section)) }
		end
	end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
adminpanel-0.1.1 spec/features/section_pages_spec.rb
adminpanel-0.1.0cl.2 spec/features/section_pages_spec.rb
adminpanel-0.1.0cl spec/features/section_pages_spec.rb