summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2015-07-25 16:42:28 -0400
committerRobert Speicher <rspeicher@gmail.com>2015-07-25 16:42:28 -0400
commitd92668a05bf35995b4b93069269084ee5db93484 (patch)
treebcff3365363a7aec935654b8af56021e2e6e37c7 /spec
parentbbbcc9657f60960fadae2d9bbd1a11b3a5319e1f (diff)
downloadgitlab-ce-d92668a05bf35995b4b93069269084ee5db93484.tar.gz
Only create :admin user in the one test where it's used
Diffstat (limited to 'spec')
-rw-r--r--spec/services/projects/create_service_spec.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/services/projects/create_service_spec.rb b/spec/services/projects/create_service_spec.rb
index 97b206c9854..3e3d85db858 100644
--- a/spec/services/projects/create_service_spec.rb
+++ b/spec/services/projects/create_service_spec.rb
@@ -4,7 +4,6 @@ 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
@@ -75,7 +74,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