Sha256: f466c3d367ced27d515ad3925a6988962973b4573c5715b2897264133d8c02e8

Contents?: true

Size: 943 Bytes

Versions: 1

Compression:

Stored size: 943 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
    view.stub(:dom_class) { '' }
    view.stub(: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

1 entries across 1 versions & 1 rubygems

Version Path
worthwhile-0.0.1 spec/views/curation_concern/base/_attributes.html.erb_spec.rb