From 500b61e14f384eec545c207fa9324906daf2e148 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Sun, 10 Jul 2016 14:41:14 +0200 Subject: Move after script CI job confg to new processor --- spec/lib/ci/gitlab_ci_yaml_processor_spec.rb | 2 +- spec/lib/gitlab/ci/config/node/job_spec.rb | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'spec') diff --git a/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb b/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb index 230106b74ae..a80b0ce5a57 100644 --- a/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb +++ b/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb @@ -984,7 +984,7 @@ EOT config = YAML.dump({ rspec: { script: "test", after_script: [10, "test"] } }) expect do GitlabCiYamlProcessor.new(config, path) - end.to raise_error(GitlabCiYamlProcessor::ValidationError, "rspec job: after_script should be an array of strings") + end.to raise_error(GitlabCiYamlProcessor::ValidationError, "jobs:rspec:after_script config should be an array of strings") end it "returns errors if image parameter is invalid" do diff --git a/spec/lib/gitlab/ci/config/node/job_spec.rb b/spec/lib/gitlab/ci/config/node/job_spec.rb index 3bcac73809d..77efc73632d 100644 --- a/spec/lib/gitlab/ci/config/node/job_spec.rb +++ b/spec/lib/gitlab/ci/config/node/job_spec.rb @@ -48,14 +48,16 @@ describe Gitlab::Ci::Config::Node::Job do context 'when entry is correct' do let(:config) do { before_script: %w[ls pwd], - script: 'rspec' } + script: 'rspec', + after_script: %w[cleanup] } end it 'returns correct value' do expect(entry.value) .to eq(before_script: %w[ls pwd], script: %w[rspec], - stage: 'test') + stage: 'test', + after_script: %w[cleanup]) end end -- cgit v1.2.1