Sha256: a74a3075126074bed84ce1353f765988398d324c19700c9071bb441fa1565ae6

Contents?: true

Size: 977 Bytes

Versions: 2

Compression:

Stored size: 977 Bytes

Contents

require "spec_helper"

feature "search blocks" do

  before do
    visit "/static_blocks"
    click_link "New block"
    fill_in "Title", :with => "foo"
    fill_in "Content", :with => "english bar"
    click_button "Submit"
    click_link "List blocks"
  end

  scenario "can search default blocks" do
    fill_in "Content contains", :with => "english bar"
    click_button "Search"
    page.should have_content("english bar")
  end

  describe "search translated blocks" do

    before do
      visit "/static_blocks"
      click_link "wk"
      click_link "Edit"
      fill_in "snippet_content", :with => "wookie bar"
      click_button "Submit"
      click_link "List blocks"
    end

    scenario "can search translated blocks" do
      fill_in "Title contains", :with => "foo"
      fill_in "Content contains", :with => "wookie bar"
      select('Published', :from => "Status")
      click_button "Search"
      page.should have_content("wookie bar")
    end
  end
end


Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
static_blocks-1.0.1 spec/integration/search_spec.rb
static_blocks-1.0.0 spec/integration/search_spec.rb