Sha256: 5cd091915b33e9a34e9c4189203a026a9d035646cd7ea4629dc06be7d1d8c667

Contents?: true

Size: 674 Bytes

Versions: 3

Compression:

Stored size: 674 Bytes

Contents

require 'spec_helper'

module Spotlight
  describe "spotlight/pages/new", :type => :view do
    let(:exhibit) { stub_model(Exhibit) } 
    before do
      assign(:page, stub_model(FeaturePage, exhibit: exhibit).as_new_record)

    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
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
blacklight-spotlight-0.3.1 spec/views/spotlight/pages/new.html.erb_spec.rb
blacklight-spotlight-0.3.0 spec/views/spotlight/pages/new.html.erb_spec.rb
blacklight-spotlight-0.2.0 spec/views/spotlight/pages/new.html.erb_spec.rb