Sha256: ca88aec16c693715af9f42753dbc9a7dd693fea36bf00d12431ffecfe1580e45

Contents?: true

Size: 1.02 KB

Versions: 3

Compression:

Stored size: 1.02 KB

Contents

require 'spec_helper'
require 'support/test_database'

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, :section_id => 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-1.2.12 spec/features/section_pages_spec.rb
adminpanel-1.2.11 spec/features/section_pages_spec.rb
adminpanel-1.2.10 spec/features/section_pages_spec.rb