summaryrefslogtreecommitdiff
path: root/spec/features/search_spec.rb
blob: 73987739a7a5ea67d08b995bc53d5820fdbabf75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
require 'spec_helper'

describe "Search", feature: true  do
  before do
    login_as :user
    @project = create(:project, namespace: @user.namespace)
    @project.team << [@user, :reporter]
    visit search_path

    within '.search-holder' do
      fill_in "search", with: @project.name[0..3]
      click_button "Search"
    end
  end

  it "should show project in search results" do
    expect(page).to have_content @project.name
  end
end