diff options
author | Felipe Artur <felipefac@gmail.com> | 2016-03-17 19:42:46 -0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2016-03-17 19:42:46 -0300 |
commit | 0a7f7161198feaa9a4cae7c16669a0e6187aed33 (patch) | |
tree | 445dcbd9f473be2af293a299b634525725a70666 /spec/services/groups | |
parent | a18ac62756573a2da2c42ca50b6f30033be6fa63 (diff) | |
download | gitlab-ce-0a7f7161198feaa9a4cae7c16669a0e6187aed33.tar.gz |
Code fixes
Diffstat (limited to 'spec/services/groups')
-rw-r--r-- | spec/services/groups/create_service_spec.rb | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/spec/services/groups/create_service_spec.rb b/spec/services/groups/create_service_spec.rb index 7dbc5297978..b938a2f0c05 100644 --- a/spec/services/groups/create_service_spec.rb +++ b/spec/services/groups/create_service_spec.rb @@ -1,22 +1,20 @@ require 'spec_helper' describe Groups::CreateService, services: true do - let!(:user) { create(:user) } - let!(:private_group) { create(:group, visibility_level: Gitlab::VisibilityLevel::PRIVATE) } - let!(:internal_group) { create(:group, visibility_level: Gitlab::VisibilityLevel::INTERNAL) } - let!(:public_group) { create(:group, visibility_level: Gitlab::VisibilityLevel::PUBLIC) } + let!(:user) { create(:user) } + let!(:group_params) { { path: "group_path", visibility_level: Gitlab::VisibilityLevel::PUBLIC } } describe "execute" do - let!(:service) { described_class.new(public_group, user, visibility_level: Gitlab::VisibilityLevel::PUBLIC ) } + let!(:service) { described_class.new(user, group_params ) } subject { service.execute } context "create groups without restricted visibility level" do - it { is_expected.to be_truthy } + it { is_expected.to be_persisted } end context "cannot create group with restricted visibility level" do before { allow(current_application_settings).to receive(:restricted_visibility_levels).and_return([Gitlab::VisibilityLevel::PUBLIC]) } - it { is_expected.to be_falsy } + it { is_expected.to_not be_persisted } end end end |