Sha256: c9b3920208637b0178f433be78acb16ea596efce0172390fbdaac3b4faf1c618

Contents?: true

Size: 968 Bytes

Versions: 5

Compression:

Stored size: 968 Bytes

Contents

require 'spec_helper'

describe 'curation_concern/base/_attributes.html.erb' do

  let(:creator)     { 'Bilbo' }
  let(:contributor) { 'Frodo' }
  let(:subject)     { 'history' }

  let(:curation_concern) { double(creator: [creator],
                                  contributor: [contributor],
                                  subject: [subject]) }

  before do
    allow(view).to receive(:dom_class) { '' }
    allow(view).to receive(:permission_badge_for) { '' }

    render partial: 'attributes', locals: { curation_concern: curation_concern }
  end

  it 'has links to search for other objects with the same metadata' do
    expect(rendered).to have_link(creator, href: catalog_index_path(search_field: 'creator', q: creator))
    expect(rendered).to have_link(contributor, href: catalog_index_path(search_field: 'contributor', q: contributor))
    expect(rendered).to have_link(subject, href: catalog_index_path(search_field: 'subject', q: subject))
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
worthwhile-0.1.2 spec/views/curation_concern/base/_attributes.html.erb_spec.rb
worthwhile-0.1.1 spec/views/curation_concern/base/_attributes.html.erb_spec.rb
worthwhile-0.1.0 spec/views/curation_concern/base/_attributes.html.erb_spec.rb
worthwhile-0.0.3 spec/views/curation_concern/base/_attributes.html.erb_spec.rb
worthwhile-0.0.2 spec/views/curation_concern/base/_attributes.html.erb_spec.rb