Sha256: 289e38d5cd8ef0b4f4815b1f69b773e09022c4b70b1244dcb298114dec52ab93

Contents?: true

Size: 1013 Bytes

Versions: 10

Compression:

Stored size: 1013 Bytes

Contents

require 'spec_helper'

describe "associations/index.html.erb" do
  let(:object) { FactoryGirl.create(:item) }
  after { object.delete }
  context "association is a collection" do
    let(:part) { FactoryGirl.create(:part) }
    before { object.parts << part }
    after do
      part.delete
      object.reload
    end
    it "should link to the show view of the association" do
      visit fcrepo_admin.object_associations_path(object)
      page.should have_link("Part (1)", :href => fcrepo_admin.object_association_path(object, "parts"))
    end
  end
  context "association is not a collection" do
    let(:collection) { FactoryGirl.create(:collection) }
    before { collection.members << object }
    after { collection.delete }
    it "should link to the show view of the target object" do
      pending "Bug in Capybara?"
      visit fcrepo_admin.object_associations_path(object)
      page.should have_link("Collection #{collection.pid}", :href => fcrepo_admin.object_path(collection))
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
fcrepo_admin-0.6.1 spec/features/associations/index.html.erb_spec.rb
fcrepo_admin-0.6.0 spec/features/associations/index.html.erb_spec.rb
fcrepo_admin-0.5.5 spec/features/associations/index.html.erb_spec.rb
fcrepo_admin-0.5.5.pre spec/features/associations/index.html.erb_spec.rb
fcrepo_admin-0.5.4 spec/features/associations/index.html.erb_spec.rb
fcrepo_admin-0.5.3 spec/features/associations/index.html.erb_spec.rb
fcrepo_admin-0.5.2 spec/features/associations/index.html.erb_spec.rb
fcrepo_admin-0.5.1 spec/features/associations/index.html.erb_spec.rb
fcrepo_admin-0.5.0 spec/features/associations/index.html.erb_spec.rb
fcrepo_admin-0.4.1 spec/features/associations/index.html.erb_spec.rb