diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-07-25 23:42:28 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-07-25 23:42:28 +0300 |
commit | d92668a05bf35995b4b93069269084ee5db93484 (patch) | |
tree | bcff3365363a7aec935654b8af56021e2e6e37c7 /spec/services/projects | |
parent | bbbcc9657f60960fadae2d9bbd1a11b3a5319e1f (diff) |
Only create :admin user in the one test where it's used
Diffstat (limited to 'spec/services/projects')
-rw-r--r-- | spec/services/projects/create_service_spec.rb | 5 |
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 |