Add missing tests and update test description

This commit is contained in:
Lin Jen-Shin 2017-04-06 21:53:02 +08:00
parent 38c324b95f
commit 1bed2c87e9
3 changed files with 3 additions and 1 deletions

View file

@ -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 }

View file

@ -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)) }

View file

@ -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')