Sha256: 5b8eaff4f923aff4ec2a1e129afe09aa0f56089efed0fb2271ef4a816431526c

Contents?: true

Size: 1022 Bytes

Versions: 9

Compression:

Stored size: 1022 Bytes

Contents

describe 'hyrax/admin/admin_sets/_show_document_list_row.html.erb', type: :view do
  let(:user) { create(:user, groups: 'admin') }

  let(:work) do
    GenericWork.create(creator: ["ggm"], title: ['One Hundred Years of Solitude']) do |gw|
      gw.apply_depositor_metadata(user)
    end
  end

  before do
    view.blacklight_config = Blacklight::Configuration.new
    allow(view).to receive(:current_user).and_return(user)
    allow(work).to receive(:title_or_label).and_return("One Hundred Years of Solitude")
    allow(work).to receive(:edit_groups).and_return([user])
    allow(work).to receive(:edit_people).and_return([user])
    allow(work).to receive(:workflow_state).and_return('deposited')
    stub_template '_show_document_list_menu.erb' => 'edit menu'
  end

  it "renders works" do
    render 'hyrax/admin/admin_sets/show_document_list_row.html.erb', show_document_list_row: work
    expect(rendered).to have_content 'One Hundred Years of Solitude'
    expect(rendered).to have_content 'deposited'
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
hyrax-1.1.1 spec/views/hyrax/admin/admin_sets/_show_document_list_row.html.erb_spec.rb
hyrax-1.1.0 spec/views/hyrax/admin/admin_sets/_show_document_list_row.html.erb_spec.rb
hyrax-1.0.5 spec/views/hyrax/admin/admin_sets/_show_document_list_row.html.erb_spec.rb
hyrax-1.0.4 spec/views/hyrax/admin/admin_sets/_show_document_list_row.html.erb_spec.rb
hyrax-1.0.3 spec/views/hyrax/admin/admin_sets/_show_document_list_row.html.erb_spec.rb
hyrax-1.0.2 spec/views/hyrax/admin/admin_sets/_show_document_list_row.html.erb_spec.rb
hyrax-1.0.1 spec/views/hyrax/admin/admin_sets/_show_document_list_row.html.erb_spec.rb
hyrax-1.0.0.rc2 spec/views/hyrax/admin/admin_sets/_show_document_list_row.html.erb_spec.rb
hyrax-1.0.0.rc1 spec/views/hyrax/admin/admin_sets/_show_document_list_row.html.erb_spec.rb