This instance will be upgraded to Heptapod 0.27.1 on 2021-12-08 at 22:00 UTC+1 (a few minutes of down time)

Commit 497a28c5 authored by Phil Hughes's avatar Phil Hughes
Browse files

Fixed project model tests

parent cee1020e226f
......@@ -434,9 +434,9 @@ def check_limit
projects_limit = creator.projects_limit
if projects_limit == 0
self.errors.add(:base, "Personal project creation is not allowed. Please contact your administrator with questions")
self.errors.add(:limit_reached, "Personal project creation is not allowed. Please contact your administrator with questions")
else
self.errors.add(:base, "Your project limit is #{projects_limit} projects! Please contact your administrator to increase it")
self.errors.add(:limit_reached, "Your project limit is #{projects_limit} projects! Please contact your administrator to increase it")
end
end
rescue
......
......@@ -60,7 +60,7 @@
project2 = build(:project)
allow(project2).to receive(:creator).and_return(double(can_create_project?: false, projects_limit: 0).as_null_object)
expect(project2).not_to be_valid
expect(project2.errors[:limit_reached].first).to match(/Your project limit is 0/)
expect(project2.errors[:limit_reached].first).to match(/Personal project creation is not allowed/)
end
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment