diff options
author | Sean McGivern <sean@gitlab.com> | 2017-09-05 18:49:05 +0300 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2017-09-06 12:08:03 +0300 |
commit | e8f29569bcb4a2d732a2c00b34958f58d5622836 (patch) | |
tree | 41b69a559246c423699c741d2f9f252911a2e525 /spec/helpers | |
parent | ac816d90d4cc116117497479f400211a43db6be1 (diff) |
Resolve outdated diff discussions on push
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 |