summaryrefslogtreecommitdiff
path: root/spec/services/groups
diff options
context:
space:
mode:
authorSara Ahbabou <sahbabou@gitlab.com>2019-04-12 05:00:50 +0000
committerMichael Kozono <mkozono@gmail.com>2019-04-12 05:00:50 +0000
commitdc00fa90e95916719bfcfeb5bdca9f0b590ca467 (patch)
treec8d1debe9c9579ee3e3095361ab250635bcd87f5 /spec/services/groups
parentd25cdca68fb945db6b60cf4da60bc6ed503bea49 (diff)
downloadgitlab-ce-dc00fa90e95916719bfcfeb5bdca9f0b590ca467.tar.gz
Squashed commits and modified visibility level output
Added changelog and rebased
Diffstat (limited to 'spec/services/groups')
-rw-r--r--spec/services/groups/create_service_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/services/groups/create_service_spec.rb b/spec/services/groups/create_service_spec.rb
index fe6a8691ae0..cd061afbfd5 100644
--- a/spec/services/groups/create_service_spec.rb
+++ b/spec/services/groups/create_service_spec.rb
@@ -88,6 +88,17 @@ describe Groups::CreateService, '#execute' do
end
end
+ describe "when visibility level is passed as a string" do
+ let(:service) { described_class.new(user, group_params) }
+ let(:group_params) { { path: 'group_path', visibility: 'public' } }
+
+ it "assigns the correct visibility level" do
+ group = service.execute
+
+ expect(group.visibility_level).to eq(Gitlab::VisibilityLevel::PUBLIC)
+ end
+ end
+
describe 'creating a mattermost team' do
let!(:params) { group_params.merge(create_chat_team: "true") }
let!(:service) { described_class.new(user, params) }