diff options
author | Simon Welsh <simon@simon.geek.nz> | 2016-06-19 02:44:50 +0300 |
---|---|---|
committer | Simon Welsh <simon@simon.geek.nz> | 2016-06-25 04:36:36 +0300 |
commit | 2fc91c48659b84375173b038b4e7957e56294aa4 (patch) | |
tree | 7f21f5a80b269927b5702059a0f545de70e41ffa /spec/services | |
parent | f0ed8930f76bb1e8b340a867dfa240561e622aa6 (diff) |
Allow "ci skip" to be in any case
Diffstat (limited to 'spec/services')
-rw-r--r-- | spec/services/create_commit_builds_service_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/services/create_commit_builds_service_spec.rb b/spec/services/create_commit_builds_service_spec.rb index deab242f45a..2255945a1ad 100644 --- a/spec/services/create_commit_builds_service_spec.rb +++ b/spec/services/create_commit_builds_service_spec.rb @@ -83,6 +83,7 @@ describe CreateCommitBuildsService, services: true do context 'when commit contains a [ci skip] directive' do let(:message) { "some message[ci skip]" } + let(:capMessage) { "some message[CI SKIP]" } before do allow_any_instance_of(Ci::Pipeline).to receive(:git_commit_message) { message } @@ -101,6 +102,20 @@ describe CreateCommitBuildsService, services: true do expect(pipeline.status).to eq("skipped") end + it "skips builds creation if there is [CI SKIP] tag in commit message" do + commits = [{ message: capMessage }] + pipeline = service.execute(project, user, + ref: 'refs/tags/0_1', + before: '00000000', + after: '31das312', + commits: commits + ) + + expect(pipeline).to be_persisted + expect(pipeline.builds.any?).to be false + expect(pipeline.status).to eq("skipped") + end + it "does not skips builds creation if there is no [ci skip] tag in commit message" do allow_any_instance_of(Ci::Pipeline).to receive(:git_commit_message) { "some message" } |