Sha256: 2d818f9d9e7a20b73549ee4488191089a97e9421d8d59fe0b7affe201b5ab51c

Contents?: true

Size: 989 Bytes

Versions: 10

Compression:

Stored size: 989 Bytes

Contents

require 'spec_helper'

describe 'hyrax/base/show.html.erb', type: :view do
  let(:solr_document) do
    SolrDocument.new(id: '999',
                     date_modified_dtsi: '2011-04-01',
                     has_model_ssim: ['GenericWork'])
  end
  let(:ability) { double }
  let(:presenter) do
    Hyrax::WorkShowPresenter.new(solr_document, ability)
  end
  let(:page) { Capybara::Node::Simple.new(rendered) }
  before do
    stub_template 'hyrax/base/_metadata.html.erb' => ''
    stub_template 'hyrax/base/_relationships.html.erb' => ''
    stub_template 'hyrax/base/_show_actions.html.erb' => ''
    stub_template 'hyrax/base/_representative_media.html.erb' => ''
    stub_template 'hyrax/base/_social_media.html.erb' => ''
    stub_template 'hyrax/base/_citations.html.erb' => ''
    stub_template 'hyrax/base/_items.html.erb' => ''
    assign(:presenter, presenter)
    render
  end

  it 'shows last saved' do
    expect(page).to have_content 'Last modified: 04/01/2011'
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
hyrax-1.1.1 spec/views/hyrax/base/show.html.erb_spec.rb
hyrax-1.1.0 spec/views/hyrax/base/show.html.erb_spec.rb
hyrax-1.0.5 spec/views/hyrax/base/show.html.erb_spec.rb
hyrax-1.0.4 spec/views/hyrax/base/show.html.erb_spec.rb
hyrax-1.0.3 spec/views/hyrax/base/show.html.erb_spec.rb
hyrax-1.0.2 spec/views/hyrax/base/show.html.erb_spec.rb
hyrax-1.0.1 spec/views/hyrax/base/show.html.erb_spec.rb
hyrax-1.0.0.rc2 spec/views/hyrax/base/show.html.erb_spec.rb
hyrax-1.0.0.rc1 spec/views/hyrax/base/show.html.erb_spec.rb
test_hyrax-0.0.1.alpha spec/views/hyrax/base/show.html.erb_spec.rb