diff options
| author | Lin Jen-Shin <godfat@godfat.org> | 2016-10-04 02:38:25 +0800 |
|---|---|---|
| committer | Lin Jen-Shin <godfat@godfat.org> | 2016-10-04 02:38:25 +0800 |
| commit | f39ba1bb5ed9c2421e60a618f71373c5d8dc94e9 (patch) | |
| tree | e5ad67c48bdc2d520b84d735225ff7eac4c7da84 /spec/features/users/snippets_spec.rb | |
| parent | db6b2b18990297d98bd74af1d2f475d0d42ec443 (diff) | |
| parent | a1aea3266e4b90869d5a9bcc334272996ab80fda (diff) | |
| download | gitlab-ce-f39ba1bb5ed9c2421e60a618f71373c5d8dc94e9.tar.gz | |
Merge remote-tracking branch 'upstream/master' into pipeline-emails
* upstream/master: (372 commits)
Enable Lint/StringConversionInInterpolation cop and autocorrect offenses
resolve duplicated changelog entry
credit myself :smile:
change determine conditions
override subject method in devise mailer
follow the styleguide: Don't use parentheses around a literal
wrap subject with method subject
move spec back into shared example `an email sent from GitLab`
stub config settings in spec
remove empty line at block body end
remove extra entry
create new test in `spec/mailers/notify_spec.rb`
move changelog to 8.13
add configurable email subject suffix
Fixes sidebar navigation.
Convert "SSH Keys" Spinach features to RSpec
Enable import/export back for non-admins
Update gitlab-shell to 3.6.3
Updated artwork of empty group state.
Better empty state for Groups view.
...
Diffstat (limited to 'spec/features/users/snippets_spec.rb')
| -rw-r--r-- | spec/features/users/snippets_spec.rb | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/spec/features/users/snippets_spec.rb b/spec/features/users/snippets_spec.rb index f00abd82fea..ce7e809ec76 100644 --- a/spec/features/users/snippets_spec.rb +++ b/spec/features/users/snippets_spec.rb @@ -3,30 +3,16 @@ require 'spec_helper' describe 'Snippets tab on a user profile', feature: true, js: true do include WaitForAjax - let(:user) { create(:user) } - context 'when the user has snippets' do + let(:user) { create(:user) } + let!(:snippets) { create_list(:snippet, 2, :public, author: user) } before do - create_list(:snippet, 25, :public, author: user) - + allow(Snippet).to receive(:default_per_page).and_return(1) visit user_path(user) page.within('.user-profile-nav') { click_link 'Snippets' } wait_for_ajax end - it 'is limited to 20 items per page' do - expect(page.all('.snippets-list-holder .snippet-row').count).to eq(20) - end - - context 'clicking on the link to the second page' do - before do - click_link('2') - wait_for_ajax - end - - it 'shows the remaining snippets' do - expect(page.all('.snippets-list-holder .snippet-row').count).to eq(5) - end - end + it_behaves_like 'paginated snippets', remote: true end end |
