gitlab-org--gitlab-foss/spec/features/users/projects_spec.rb
Jacopo ff76adb547 Unnecessary "include WaitForAjax" and "include ApiHelpers"
Removed all the unnecessary include of `WaitForAjax` and `ApiHelpers` in the specs.
Removed unnecessary usage of `api:true`
2017-04-21 22:32:02 +02:00

29 lines
651 B
Ruby

require 'spec_helper'
describe 'Projects tab on a user profile', :feature, :js do
let(:user) { create(:user) }
let!(:project) { create(:empty_project, namespace: user.namespace) }
let!(:project2) { create(:empty_project, namespace: user.namespace) }
before do
allow(Project).to receive(:default_per_page).and_return(1)
login_as(user)
visit user_path(user)
page.within('.user-profile-nav') do
click_link('Personal projects')
end
wait_for_ajax
end
it 'paginates results' do
expect(page).to have_content(project2.name)
click_link('Next')
expect(page).to have_content(project.name)
end
end