Wiki search

Very basic, using LIKE, and no search snippets.
This commit is contained in:
Ilya Baryshev 2012-10-16 23:05:11 +04:00
parent db3d90cbcb
commit e6524a919e
6 changed files with 50 additions and 2 deletions

View file

@ -2,8 +2,13 @@ Feature: Dashboard Search
Background:
Given I sign in as a user
And I own project "Shop"
And Project "Shop" has wiki page "Contibuting guide"
And I visit dashboard search page
Scenario: I should see project I am looking for
Given I search for "Sho"
Then I should see "Shop" project link
Scenario: I should see wiki page I am looking for
Given I search for "Contibuting"
Then I should see "Contibuting guide" wiki link

View file

@ -15,4 +15,21 @@ class DashboardSearch < Spinach::FeatureSteps
@project = Factory :project, :name => "Shop"
@project.add_access(@user, :admin)
end
Given 'I search for "Contibuting"' do
fill_in "dashboard_search", :with => "Contibuting"
click_button "Search"
end
And 'Project "Shop" has wiki page "Contibuting guide"' do
@wiki_page = Factory :wiki, :project => @project,
:title => "Contibuting guide",
:slug => "contributing"
end
Then 'I should see "Contibuting guide" wiki link' do
page.should have_link "Contibuting guide"
end
end