2012-05-27 12:22:23 +02:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe "Search" do
|
|
|
|
before do
|
|
|
|
login_as :user
|
2012-11-06 04:31:55 +01:00
|
|
|
@project = create(:project)
|
2013-01-04 17:50:31 +01:00
|
|
|
@project.team << [@user, :reporter]
|
2012-05-27 12:22:23 +02:00
|
|
|
visit search_path
|
2013-02-21 12:28:05 +01:00
|
|
|
|
|
|
|
within '.search-holder' do
|
|
|
|
fill_in "search", with: @project.name[0..3]
|
|
|
|
click_button "Search"
|
|
|
|
end
|
2012-05-27 12:22:23 +02:00
|
|
|
end
|
|
|
|
|
2012-11-06 04:31:55 +01:00
|
|
|
it "should show project in search results" do
|
2012-05-27 12:22:23 +02:00
|
|
|
page.should have_content @project.name
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|