Sha256: 7c9b37e1e855f5454761026113595f0097e568eab2bc8e19cb4d031d45ed0a69

Contents?: true

Size: 747 Bytes

Versions: 23

Compression:

Stored size: 747 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(default_thumbnail_jcrop_options: {}, available_index_fields: [], available_view_fields: [])
  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

23 entries across 23 versions & 1 rubygems

Version Path
blacklight-spotlight-0.20.0 spec/views/spotlight/pages/new.html.erb_spec.rb
blacklight-spotlight-0.19.2 spec/views/spotlight/pages/new.html.erb_spec.rb
blacklight-spotlight-0.19.1 spec/views/spotlight/pages/new.html.erb_spec.rb