diff options
| author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-10-03 07:25:38 +0000 |
|---|---|---|
| committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-10-03 07:25:38 +0000 |
| commit | 2f76f755a96876edc6307508a0b984e44f694c8c (patch) | |
| tree | 6724a8f3ebc9e523047b4ee8a4b8fdaea6723c63 /spec/services | |
| parent | 9235f1d491f83638b0f199fb78bc09f04660f450 (diff) | |
| parent | f8349e320770fe8e0498439719d33e0ef80d1d06 (diff) | |
| download | gitlab-ce-2f76f755a96876edc6307508a0b984e44f694c8c.tar.gz | |
Merge branch '22773-add-comparison-link-to-system-note' into 'master'
Add link to comparison from system note, update changelog
## What does this MR do?
Adds a link to the comparison between the previous and latest version.
## Are there points in the code the reviewer needs to double check?
## Why was this MR needed?
## Screenshots (if relevant)

## Does this MR meet the acceptance criteria?
- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [ ] ~~[Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~
- [ ] ~~API support added~~
- Tests
- [x] Added for this feature/bug
- [ ] All builds are passing
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
## What are the relevant issue numbers?
Closes #22773
See merge request !6607
Diffstat (limited to 'spec/services')
| -rw-r--r-- | spec/services/system_note_service_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/services/system_note_service_spec.rb b/spec/services/system_note_service_spec.rb index 3d854a959f3..b16840a1238 100644 --- a/spec/services/system_note_service_spec.rb +++ b/spec/services/system_note_service_spec.rb @@ -40,6 +40,12 @@ describe SystemNoteService, services: true do describe 'note body' do let(:note_lines) { subject.note.split("\n").reject(&:blank?) } + describe 'comparison diff link line' do + it 'adds the comparison text' do + expect(note_lines[2]).to match "[Compare with previous version]" + end + end + context 'without existing commits' do it 'adds a message header' do expect(note_lines[0]).to eq "Added #{new_commits.size} commits:" |
