diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-02-15 11:12:07 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-02-15 11:12:07 +0100 |
commit | 3ba65185127da07cd82d346fdcf001878b97fd31 (patch) | |
tree | 27020a040970bd6da0b3ca882a3c7a486788a1d3 /spec/models/ci | |
parent | 9c37a26cc744ff4479f2b3b62c15d8b0e62f728d (diff) | |
download | gitlab-ce-3ba65185127da07cd82d346fdcf001878b97fd31.tar.gz |
Prefer using `project.add_developer` in specs
Diffstat (limited to 'spec/models/ci')
-rw-r--r-- | spec/models/ci/build_spec.rb | 6 | ||||
-rw-r--r-- | spec/models/ci/pipeline_spec.rb | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/spec/models/ci/build_spec.rb b/spec/models/ci/build_spec.rb index 9d5849eeec1..2dfca8bcfce 100644 --- a/spec/models/ci/build_spec.rb +++ b/spec/models/ci/build_spec.rb @@ -208,7 +208,7 @@ describe Ci::Build, :models do end it 'expects to have retried builds instead the original ones' do - project.team << [user, :developer] + project.add_developer(user) retried_rspec = Ci::Build.retry(rspec_test, user) @@ -817,7 +817,7 @@ describe Ci::Build, :models do subject { build.other_actions } before do - project.team << [user, :developer] + project.add_developer(user) end it 'returns other actions' do @@ -865,7 +865,7 @@ describe Ci::Build, :models do let(:build) { create(:ci_build, :manual, pipeline: pipeline) } before do - project.team << [user, :developer] + project.add_developer(user) end context 'when build is manual' do diff --git a/spec/models/ci/pipeline_spec.rb b/spec/models/ci/pipeline_spec.rb index 45c710b2381..10c2bfbb400 100644 --- a/spec/models/ci/pipeline_spec.rb +++ b/spec/models/ci/pipeline_spec.rb @@ -563,7 +563,7 @@ describe Ci::Pipeline, models: true do context 'on failure and build retry' do before do build.drop - project.team << [user, :developer] + project.add_developer(user) Ci::Build.retry(build, user) end @@ -776,7 +776,7 @@ describe Ci::Pipeline, models: true do let(:latest_status) { pipeline.statuses.latest.pluck(:status) } before do - project.team << [user, :developer] + project.add_developer(user) end context 'when there is a failed build and failed external status' do |