2012-05-27 06:22:23 -04:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2014-04-12 04:56:37 -04:00
|
|
|
describe "Search", feature: true do
|
2012-05-27 06:22:23 -04:00
|
|
|
before do
|
|
|
|
login_as :user
|
2013-06-22 11:57:34 -04:00
|
|
|
@project = create(:project, namespace: @user.namespace)
|
2013-01-04 11:50:31 -05:00
|
|
|
@project.team << [@user, :reporter]
|
2012-05-27 06:22:23 -04:00
|
|
|
visit search_path
|
2013-02-21 06:28:05 -05:00
|
|
|
|
2015-06-13 18:30:09 -04:00
|
|
|
page.within '.search-holder' do
|
2013-02-21 06:28:05 -05:00
|
|
|
fill_in "search", with: @project.name[0..3]
|
|
|
|
click_button "Search"
|
|
|
|
end
|
2012-05-27 06:22:23 -04:00
|
|
|
end
|
|
|
|
|
2012-11-05 22:31:55 -05:00
|
|
|
it "should show project in search results" do
|
2015-02-12 13:17:35 -05:00
|
|
|
expect(page).to have_content @project.name
|
2012-05-27 06:22:23 -04:00
|
|
|
end
|
|
|
|
end
|