debian-mirror-gitlab/spec/features/global_search_spec.rb
2018-11-18 11:00:15 +05:30

28 lines
696 B
Ruby

require 'spec_helper'
describe 'Global search' do
let(:user) { create(:user) }
let(:project) { create(:project, namespace: user.namespace) }
before do
project.add_maintainer(user)
sign_in(user)
end
describe 'I search through the issues and I see pagination' do
before do
allow_any_instance_of(Gitlab::SearchResults).to receive(:per_page).and_return(1)
create_list(:issue, 2, project: project, title: 'initial')
end
it "has a pagination" do
visit dashboard_projects_path
fill_in "search", with: "initial"
click_button "Go"
select_filter("Issues")
expect(page).to have_selector('.gl-pagination .next')
end
end
end