Created
February 24, 2009 15:18
-
-
Save timharding/69610 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
context "fills in the search form and clicks the search button that" do | |
setup do | |
@searched_for_page = Factory(:page, :slug => "interesting", :translations => [Factory(:page_translation, :page_name => 'An interesting query')]) | |
ActsAsXapian.update_index(true, true) | |
@query_string = "interesting" | |
fill_in "q", :with => @query_string | |
click_button "search_button" | |
save_and_open_page | |
end | |
should_respond_with :success | |
should_render_template :index | |
should 'access the search controller' do | |
assert_equal 'SearchesController', @controller.class.name | |
end | |
should_assign_to :search_results | |
should 'display some search results' do | |
assert_select "ul#search_results" do | |
assert_select "li#search_result_page_#{@searched_for_page.id}" | |
end | |
end | |
teardown do | |
@searched_for_page.destroy | |
ActsAsXapian.update_index(true, true) | |
end | |
end | |
# STDOUT | |
# ActsAsXapian.update_index update AbstractPage 3907 | |
# ActsAsXapian.update_index update AbstractPage 3908 | |
# ActsAsXapian.update_index update AbstractPage 3909 | |
# ActsAsXapian.update_index update AbstractPage 3910 | |
# ActsAsXapian.update_index update AbstractPage 3911 | |
# ActsAsXapian.update_index update AbstractPage 3912 | |
# ActsAsXapian.update_index update AbstractPage 3913 | |
# ActsAsXapian.update_index update AbstractPage 3914 | |
# ActsAsXapian.update_index update AbstractPage 3915 | |
# ActsAsXapian.update_index update AbstractPage 3916 | |
# ActsAsXapian.update_index update AbstractPage 3917 | |
# ActsAsXapian.update_index update AbstractPage 3918 | |
# ActsAsXapian.update_index update AbstractPage 3919 | |
# ActsAsXapian.update_index update AbstractPage 3920 | |
# ActsAsXapian.update_index update AbstractPage 3921 | |
# ActsAsXapian.update_index update AbstractPage 3922 | |
# ActsAsXapian.update_index update AbstractPage 3923 | |
# ActsAsXapian.update_index destroy AbstractPage 3923 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment