summaryrefslogtreecommitdiff
path: root/spec/models/project_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/project_spec.rb')
-rw-r--r--spec/models/project_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb
index 37604a557ea..d06e87451bd 100644
--- a/spec/models/project_spec.rb
+++ b/spec/models/project_spec.rb
@@ -1349,6 +1349,14 @@ describe Project do
end
end
+ describe '.with_limit' do
+ it 'limits the number of projects returned' do
+ create_list(:project, 3)
+
+ expect(described_class.with_limit(1).count).to eq(1)
+ end
+ end
+
describe '.visible_to_user' do
let!(:project) { create(:project, :private) }
let!(:user) { create(:user) }