diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2018-11-12 21:19:50 +0300 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2018-11-12 21:34:47 +0300 |
commit | b45a7cc012637733db8865235619f70ef8cb143a (patch) | |
tree | 53a5d91dae9500d88e2553aaf3158b26a4382988 /spec/services | |
parent | 938d8900ad64edc7ad0fda7f6ed98f454c4528d1 (diff) |
tags test
Diffstat (limited to 'spec/services')
-rw-r--r-- | spec/services/ci/create_pipeline_service_spec.rb | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/spec/services/ci/create_pipeline_service_spec.rb b/spec/services/ci/create_pipeline_service_spec.rb index 5c87ed5c3c6..5f67d732cc6 100644 --- a/spec/services/ci/create_pipeline_service_spec.rb +++ b/spec/services/ci/create_pipeline_service_spec.rb @@ -387,7 +387,7 @@ describe Ci::CreatePipelineService do context 'with environment' do before do - config = YAML.dump(deploy: { environment: { name: "review/$CI_COMMIT_REF_NAME" }, script: 'ls' }) + config = YAML.dump(deploy: { environment: { name: "review/$CI_COMMIT_REF_NAME" }, script: 'ls'}) stub_ci_pipeline_yaml_file(config) end @@ -397,6 +397,18 @@ describe Ci::CreatePipelineService do expect(result).to be_persisted expect(Environment.find_by(name: "review/master")).to be_present end + + it 'also has tags' do + config = YAML.dump(deploy: { environment: { name: "review/$CI_COMMIT_REF_NAME" }, script: 'ls', tags: ['hello'] }) + stub_ci_pipeline_yaml_file(config) + result = execute_service + + config = YAML.dump(deploy: { tags: ['hello'], script: ['ls'] }) + stub_ci_pipeline_yaml_file(config) + result = execute_service + + expect(Ci::Build.with_any_tags.count).to eq(2) + end end context 'with environment name including persisted variables' do |