diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-09-06 14:57:16 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-09-06 14:57:16 +0300 |
commit | 99852965211166c21807522603818e41d03aa2d3 (patch) | |
tree | 76443bd547bef0522d103c421d982b6c07bf6313 /spec/helpers | |
parent | c1af169f1ad4651ff923a220d428357a5d9e3a97 (diff) | |
parent | b40941db14091bce20fd5edc9bb04b82a7eb21b9 (diff) |
Merge branch 'AshleyDumaine/gitlab-ce-36994-toggle-for-automatically-collapsing-outdated-diff-comments' into 'master'
Add setting to collapse outdated diff comments on push
Closes #36994
See merge request !14053
Diffstat (limited to 'spec/helpers')
-rw-r--r-- | spec/helpers/notes_helper_spec.rb | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/spec/helpers/notes_helper_spec.rb b/spec/helpers/notes_helper_spec.rb index 9921ca1af33..68540dd4e59 100644 --- a/spec/helpers/notes_helper_spec.rb +++ b/spec/helpers/notes_helper_spec.rb @@ -231,7 +231,7 @@ describe NotesHelper do end end - describe '#form_resurces' do + describe '#form_resources' do it 'returns note for personal snippet' do @snippet = create(:personal_snippet) @note = create(:note_on_personal_snippet) @@ -266,4 +266,22 @@ describe NotesHelper do expect(noteable_note_url(note)).to match("/#{project.namespace.path}/#{project.path}/issues/#{issue.iid}##{dom_id(note)}") end end + + describe '#discussion_resolved_intro' do + context 'when the discussion was resolved by a push' do + let(:discussion) { double(:discussion, resolved_by_push?: true) } + + it 'returns "Automatically resolved"' do + expect(discussion_resolved_intro(discussion)).to eq('Automatically resolved') + end + end + + context 'when the discussion was not resolved by a push' do + let(:discussion) { double(:discussion, resolved_by_push?: false) } + + it 'returns "Resolved"' do + expect(discussion_resolved_intro(discussion)).to eq('Resolved') + end + end + end end |