summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorValery Sizov <valery@gitlab.com>2015-07-27 07:36:14 +0000
committerValery Sizov <valery@gitlab.com>2015-07-27 07:36:14 +0000
commite1cdc26e48831aadd261f6b0bd6755c9b8b41c89 (patch)
treef99b15d7395098dbdaba87c5e2431773e94e2ead /spec
parent8be3d1204eabc2db9a18cda01578282b617ceddf (diff)
parent88aed4096274db4b2cf61c0afaa7c1df5c5f5b33 (diff)
downloadgitlab-ce-e1cdc26e48831aadd261f6b0bd6755c9b8b41c89.tar.gz
Merge branch 'rs-dev-issue-306' into 'master'
Create project services on Project creation Closes internal https://dev.gitlab.org/gitlab/gitlab-ee/issues/306#note_53354 See merge request !1045
Diffstat (limited to 'spec')
-rw-r--r--spec/services/projects/create_service_spec.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/spec/services/projects/create_service_spec.rb b/spec/services/projects/create_service_spec.rb
index 97b206c9854..66cdfd5d758 100644
--- a/spec/services/projects/create_service_spec.rb
+++ b/spec/services/projects/create_service_spec.rb
@@ -4,13 +4,19 @@ describe Projects::CreateService do
describe :create_by_user do
before do
@user = create :user
- @admin = create :user, admin: true
@opts = {
name: "GitLab",
namespace: @user.namespace
}
end
+ it 'creates services on Project creation' do
+ project = create_project(@user, @opts)
+ project.reload
+
+ expect(project.services).not_to be_empty
+ end
+
context 'user namespace' do
before do
@project = create_project(@user, @opts)
@@ -75,7 +81,9 @@ describe Projects::CreateService do
end
it 'should allow a restricted visibility level for admins' do
- project = create_project(@admin, @opts)
+ admin = create(:admin)
+ project = create_project(admin, @opts)
+
expect(project.errors.any?).to be(false)
expect(project.saved?).to be(true)
end