2012-05-27 06:22:23 -04:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe "Search" do
|
|
|
|
before do
|
2013-06-22 11:57:34 -04:00
|
|
|
ActiveRecord::Base.observers.enable(:user_observer)
|
2012-05-27 06:22:23 -04:00
|
|
|
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
|
|
|
|
|
|
|
within '.search-holder' do
|
|
|
|
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
|
2012-05-27 06:22:23 -04:00
|
|
|
page.should have_content @project.name
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|