diff options
Diffstat (limited to 'spec/finders/group_projects_finder_spec.rb')
-rw-r--r-- | spec/finders/group_projects_finder_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/finders/group_projects_finder_spec.rb b/spec/finders/group_projects_finder_spec.rb index b291b5d4b90..0a7ca5211e1 100644 --- a/spec/finders/group_projects_finder_spec.rb +++ b/spec/finders/group_projects_finder_spec.rb @@ -168,4 +168,20 @@ describe GroupProjectsFinder do end end end + + describe 'limiting' do + context 'without limiting' do + it 'returns all projects' do + expect(subject.count).to eq(3) + end + end + + context 'with limiting' do + let(:options) { { limit: 1 } } + + it 'returns only the number of projects specified by the limit' do + expect(subject.count).to eq(1) + end + end + end end |