summaryrefslogtreecommitdiff
path: root/spec/models
diff options
context:
space:
mode:
authorPeter Marko <peter.marko@siemens.com>2019-05-14 08:45:08 +0200
committerPeter Marko <peter.marko@siemens.com>2019-05-14 09:35:47 +0200
commitb554011271b3acdc58bc2ef5bff1a3d40b69c5dd (patch)
tree31cf94c2e3f573641f34869f131c8783c3ea52c9 /spec/models
parentdeccdd7252579be022282797f28d16b415b3ca80 (diff)
downloadgitlab-ce-b554011271b3acdc58bc2ef5bff1a3d40b69c5dd.tar.gz
Fix project visibility level validation
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/project_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb
index 2a17bd6002e..425096d7e80 100644
--- a/spec/models/project_spec.rb
+++ b/spec/models/project_spec.rb
@@ -214,6 +214,13 @@ describe Project do
expect(project2).not_to be_valid
end
+ it 'validates the visibility' do
+ expect_any_instance_of(described_class).to receive(:visibility_level_allowed_as_fork).and_call_original
+ expect_any_instance_of(described_class).to receive(:visibility_level_allowed_by_group).and_call_original
+
+ create(:project)
+ end
+
describe 'wiki path conflict' do
context "when the new path has been used by the wiki of other Project" do
it 'has an error on the name attribute' do