diff options
author | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-06-07 21:33:50 +0300 |
---|---|---|
committer | Clement Ho <clemmakesapps@gmail.com> | 2017-06-07 21:33:50 +0300 |
commit | 32cac597275706930b221b19fb20b29ccebc7130 (patch) | |
tree | eff1772526935597f6539eec340d0c29f0049fc7 /spec/features/reportable_note/snippets_spec.rb | |
parent | 8bd232d43bb2c0c8d5b5b4e92609adcfbda9a008 (diff) |
Added more actions and report as abuse to all notes
Diffstat (limited to 'spec/features/reportable_note/snippets_spec.rb')
-rw-r--r-- | spec/features/reportable_note/snippets_spec.rb | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/spec/features/reportable_note/snippets_spec.rb b/spec/features/reportable_note/snippets_spec.rb new file mode 100644 index 00000000000..3f1e0cf9097 --- /dev/null +++ b/spec/features/reportable_note/snippets_spec.rb @@ -0,0 +1,33 @@ +require 'spec_helper' + +describe 'Reportable note on snippets', :feature, :js do + let(:user) { create(:user) } + let(:project) { create(:empty_project) } + + before do + project.add_master(user) + login_as user + end + + describe 'on project snippet' do + let(:snippet) { create(:project_snippet, :public, project: project, author: user) } + let!(:note) { create(:note_on_project_snippet, noteable: snippet, project: project) } + + before do + visit namespace_project_snippet_path(project.namespace, project, snippet) + end + + it_behaves_like 'reportable note' + end + + describe 'on personal snippet' do + let(:snippet) { create(:personal_snippet, :public, author: user) } + let!(:note) { create(:note_on_personal_snippet, noteable: snippet, author: user) } + + before do + visit snippet_path(snippet) + end + + it_behaves_like 'reportable note' + end +end |