Sha256: 0fccd29596a58d9046047f63d885d8fa5e746ffe6c7db87de46902d979081609

Contents?: true

Size: 658 Bytes

Versions: 8

Compression:

Stored size: 658 Bytes

Contents

require 'spec_helper'

describe 'curation_concerns/base/_attribute_rows.html.erb', type: :view do
  let(:url) { "http://example.com" }
  let(:ability) { double }
  let(:work) { stub_model(GenericWork, related_url: [url]) }
  let(:solr_document) { SolrDocument.new(work.to_solr) }
  let(:presenter) { Sufia::WorkShowPresenter.new(solr_document, ability) }

  let(:page) do
    render 'curation_concerns/base/attribute_rows', presenter: presenter
    Capybara::Node::Simple.new(rendered)
  end

  it 'shows external link with icon for related url field' do
    expect(page).to have_selector '.glyphicon-new-window'
    expect(page).to have_link(url)
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
sufia-7.4.1 spec/views/curation_concerns/base/_attribute_rows.html.erb_spec.rb
sufia-7.4.0 spec/views/curation_concerns/base/_attribute_rows.html.erb_spec.rb
sufia-7.3.1 spec/views/curation_concerns/base/_attribute_rows.html.erb_spec.rb
sufia-7.3.0 spec/views/curation_concerns/base/_attribute_rows.html.erb_spec.rb
sufia-7.3.0.rc3 spec/views/curation_concerns/base/_attribute_rows.html.erb_spec.rb
sufia-7.3.0.rc2 spec/views/curation_concerns/base/_attribute_rows.html.erb_spec.rb
sufia-7.3.0.rc1 spec/views/curation_concerns/base/_attribute_rows.html.erb_spec.rb
sufia-7.2.0 spec/views/curation_concerns/base/_attribute_rows.html.erb_spec.rb