diff options
author | Peter Leitzen <pl@neopoly.de> | 2018-07-21 15:57:52 +0300 |
---|---|---|
committer | Peter Leitzen <pl@neopoly.de> | 2018-08-10 17:45:11 +0300 |
commit | 7a4b288ec96e64bd9eaf1296d319a39401901df4 (patch) | |
tree | e8b488873903d3ec07a5dd0df0cdf006efcde088 /spec/services/system_note_service_spec.rb | |
parent | d6eaf38be4fa1785b6e47eeb76f4ca2cb20a144d (diff) |
Create a system note after tagging a commit
Diffstat (limited to 'spec/services/system_note_service_spec.rb')
-rw-r--r-- | spec/services/system_note_service_spec.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/services/system_note_service_spec.rb b/spec/services/system_note_service_spec.rb index 57d081cffb3..cbe5668cf08 100644 --- a/spec/services/system_note_service_spec.rb +++ b/spec/services/system_note_service_spec.rb @@ -108,6 +108,23 @@ describe SystemNoteService do end end + describe '.tag_commit' do + let(:noteable) do + project.commit + end + let(:tag_name) { '1.2.3' } + + subject { described_class.tag_commit(noteable, project, author, tag_name) } + + it_behaves_like 'a system note' do + let(:action) { 'tag' } + end + + it 'sets the note text' do + expect(subject.note).to eq "tagged commit #{noteable.sha} to `#{tag_name}`" + end + end + describe '.change_assignee' do subject { described_class.change_assignee(noteable, project, author, assignee) } |