Add a test to ensure this works on MySQL
This commit is contained in:
parent
b5918f222b
commit
5d63a39395
1 changed files with 17 additions and 0 deletions
17
spec/migrations/update_retried_for_ci_builds_spec.rb
Normal file
17
spec/migrations/update_retried_for_ci_builds_spec.rb
Normal file
|
@ -0,0 +1,17 @@
|
|||
require 'spec_helper'
|
||||
require Rails.root.join('db', 'post_migrate', '20170503004427_upate_retried_for_ci_build.rb')
|
||||
|
||||
describe UpateRetriedForCiBuild, truncate: true do
|
||||
let(:pipeline) { create(:ci_pipeline) }
|
||||
let!(:build_old) { create(:ci_build, pipeline: pipeline, name: 'test') }
|
||||
let!(:build_new) { create(:ci_build, pipeline: pipeline, name: 'test') }
|
||||
|
||||
before do
|
||||
described_class.new.up
|
||||
end
|
||||
|
||||
it 'updates ci_builds.is_retried' do
|
||||
expect(build_old.reload).to be_retried
|
||||
expect(build_new.reload).not_to be_retried
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue