Sha256: 34967785e3c22ffd9328369c97ad54004a555a33e6734bf7a8467ca06e233172

Contents?: true

Size: 747 Bytes

Versions: 2

Compression:

Stored size: 747 Bytes

Contents

require 'spec_helper'

describe 'curate/collections/show.html.erb' do
  let(:bilbo) { FactoryGirl.build(:person, name: 'Bilbo') }
  let(:frodo) { FactoryGirl.build(:person, name: 'Frodo') }
  let(:work1) { FactoryGirl.build(:generic_work, contributors: [frodo, bilbo], title: 'There and Back Again') }
  let(:coll1) { FactoryGirl.build(:collection) }

  before do
    coll1.members << work1
    assign :collection, coll1
    render
  end

  it 'lists items in the collection along with contributors' do
    assert_select '#documents ul' do
      assert_select 'a[href=?]', curation_concern_generic_work_path(work1), text: 'There and Back Again'
    end
    rendered.should have_content('Frodo')
    rendered.should have_content('Bilbo')
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
curate-0.5.0 spec/views/curate/collections/show.html.erb_spec.rb
curate-0.4.2 spec/views/curate/collections/show.html.erb_spec.rb