Sha256: f4a17c0269a548777365d23c6d0775bfb85b7ba3f247c9af309dd708f894292d

Contents?: true

Size: 1.13 KB

Versions: 10

Compression:

Stored size: 1.13 KB

Contents

describe 'hyrax/collections/edit.html.erb', type: :view do
  let(:collection) { stub_model(Collection, id: 'xyz123z4', title: ["Make Collections Great Again"]) }
  let(:form) { Hyrax::Forms::CollectionForm.new(collection) }
  let(:solr_response) { double(response: { 'numFound' => 0 }) }

  before do
    allow(view).to receive(:has_collection_search_parameters?).and_return(false)
    allow(controller).to receive(:current_user).and_return(stub_model(User))
    assign(:collection, collection)
    assign(:form, form)
    assign(:response, solr_response)
    stub_template 'hyrax/collections/_search_form.html.erb' => 'search form'
    stub_template 'hyrax/my/_did_you_mean.html.erb' => 'did you mean'
    stub_template 'hyrax/collections/_sort_and_per_page.html.erb' => 'sort and per page'
    stub_template 'hyrax/collections/_document_list.html.erb' => 'document list'
    stub_template 'hyrax/collections/_paginate.html.erb' => 'paginate'
    stub_template 'hyrax/collections/_form.html.erb' => 'form'

    render
  end

  it 'displays the page' do
    expect(rendered).to have_content 'Actions'
    expect(rendered).to have_link 'Add works'
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

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