Commit 853b0dff authored by Lin Jen-Shin's avatar Lin Jen-Shin
parent 62f115dd
...@@ -853,7 +853,7 @@ describe Ci::Build, models: true do ...@@ -853,7 +853,7 @@ describe Ci::Build, models: true do
describe '#when' do describe '#when' do
subject { build.when } subject { build.when }
context 'if is undefined' do context 'when `when` is undefined' do
before do before do
build.update(when: nil) build.update(when: nil)
build.reload # reload pipeline so that it resets config_processor build.reload # reload pipeline so that it resets config_processor
...@@ -864,13 +864,13 @@ describe Ci::Build, models: true do ...@@ -864,13 +864,13 @@ describe Ci::Build, models: true do
stub_ci_pipeline_yaml_file(config) stub_ci_pipeline_yaml_file(config)
end end
context 'if config is not found' do context 'when config is not found' do
let(:config) { nil } let(:config) { nil }
it { is_expected.to eq('on_success') } it { is_expected.to eq('on_success') }
end end
context 'if config does not have a questioned job' do context 'when config does not have a questioned job' do
let(:config) do let(:config) do
YAML.dump({ YAML.dump({
test_other: { test_other: {
...@@ -882,7 +882,7 @@ describe Ci::Build, models: true do ...@@ -882,7 +882,7 @@ describe Ci::Build, models: true do
it { is_expected.to eq('on_success') } it { is_expected.to eq('on_success') }
end end
context 'if config has when' do context 'when config has when' do
let(:config) do let(:config) do
YAML.dump({ YAML.dump({
test: { test: {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment