diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2017-04-06 21:53:02 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2017-04-06 21:53:02 +0800 |
commit | 1bed2c87e92ca1f42d4e94fbd1e83b392e7736e7 (patch) | |
tree | d943d8f29aed2167a1b643244fa70cff13a06750 | |
parent | 38c324b95fb10d7d49a2d54e1d2cb53528f03d3f (diff) | |
download | gitlab-ce-1bed2c87e92ca1f42d4e94fbd1e83b392e7736e7.tar.gz |
Add missing tests and update test description
-rw-r--r-- | spec/models/ci/pipeline_spec.rb | 1 | ||||
-rw-r--r-- | spec/models/commit_status_spec.rb | 1 | ||||
-rw-r--r-- | spec/presenters/ci/build_presenter_spec.rb | 2 |
3 files changed, 3 insertions, 1 deletions
diff --git a/spec/models/ci/pipeline_spec.rb b/spec/models/ci/pipeline_spec.rb index 3595601a72d..8d2533b39e3 100644 --- a/spec/models/ci/pipeline_spec.rb +++ b/spec/models/ci/pipeline_spec.rb @@ -18,6 +18,7 @@ describe Ci::Pipeline, models: true do it { is_expected.to have_many(:trigger_requests) } it { is_expected.to have_many(:builds) } it { is_expected.to have_many(:auto_canceled_pipelines) } + it { is_expected.to have_many(:auto_canceled_jobs) } it { is_expected.to validate_presence_of :sha } it { is_expected.to validate_presence_of :status } diff --git a/spec/models/commit_status_spec.rb b/spec/models/commit_status_spec.rb index 3bffb8dba72..f15ff2f985d 100644 --- a/spec/models/commit_status_spec.rb +++ b/spec/models/commit_status_spec.rb @@ -16,6 +16,7 @@ describe CommitStatus, :models do it { is_expected.to belong_to(:pipeline) } it { is_expected.to belong_to(:user) } it { is_expected.to belong_to(:project) } + it { is_expected.to belong_to(:auto_canceled_by) } it { is_expected.to validate_presence_of(:name) } it { is_expected.to validate_inclusion_of(:status).in_array(%w(pending running failed success canceled)) } diff --git a/spec/presenters/ci/build_presenter_spec.rb b/spec/presenters/ci/build_presenter_spec.rb index ebb599bb48c..2190ab0e82e 100644 --- a/spec/presenters/ci/build_presenter_spec.rb +++ b/spec/presenters/ci/build_presenter_spec.rb @@ -64,7 +64,7 @@ describe Ci::BuildPresenter do expect(build).to receive(:auto_canceled_by_id).and_return(1) end - it 'shows that the job is auto-canceled' do + it 'shows that the build is auto-canceled' do status_title = presenter.status_title expect(status_title).to include('auto-canceled') |