Sha256: aa4dfd558913b5c8400992f9cd9683b03597837476f44416f2b8d47410b26315

Contents?: true

Size: 758 Bytes

Versions: 9

Compression:

Stored size: 758 Bytes

Contents

describe 'spotlight/pages/new', type: :view do
  let(:exhibit) { stub_model(Spotlight::Exhibit) }
  before do
    assign(:page, stub_model(Spotlight::FeaturePage, exhibit: exhibit).as_new_record)
    allow(view).to receive_messages(configurations_for_current_page: {},
                                    featured_images_path: '/foo')
  end

  it 'renders new page form' do
    render

    # Run the generator again with the --webrat flag if you want to use webrat matchers
    assert_select 'form[action=?][method=?]', spotlight.exhibit_feature_pages_path(exhibit), 'post' do
      assert_select 'input#feature_page_title[name=?]', 'feature_page[title]'
      assert_select 'textarea#feature_page_content[name=?]', 'feature_page[content]'
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
blacklight-spotlight-2.4.1 spec/views/spotlight/pages/new.html.erb_spec.rb
blacklight-spotlight-2.4.0 spec/views/spotlight/pages/new.html.erb_spec.rb
blacklight-spotlight-2.3.3 spec/views/spotlight/pages/new.html.erb_spec.rb
blacklight-spotlight-2.3.2 spec/views/spotlight/pages/new.html.erb_spec.rb
blacklight-spotlight-2.3.1 spec/views/spotlight/pages/new.html.erb_spec.rb
blacklight-spotlight-2.3.0 spec/views/spotlight/pages/new.html.erb_spec.rb
blacklight-spotlight-2.2.1 spec/views/spotlight/pages/new.html.erb_spec.rb
blacklight-spotlight-2.2.0 spec/views/spotlight/pages/new.html.erb_spec.rb
blacklight-spotlight-2.1.0 spec/views/spotlight/pages/new.html.erb_spec.rb