require 'spec_helper'

describe "Content display" do
	let(:customer) { create :customer }
	let(:subtrade) { create :subtrade }
	let(:content) { create :content, user: customer, subtrade: subtrade , private_content: true}

	before do
		content.save
		login_as_user customer 
		visit customer_contents_path
	end

	trade { page }

	it{ should have_content content.document_file_name }
	it{ should have_content content.subtrade.name }
	it{ should have_content "Create New Content"}
	it{ should_not have_content "Share" }

	describe "display pending approval" do
		before { click_link "Your Content" }
		it{ should have_content "Pending Approval" }
	end
end