2017-06-07 14:33:50 -04:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2017-06-29 00:13:10 -04:00
|
|
|
describe 'Reportable note on snippets', :js do
|
2017-06-07 14:33:50 -04:00
|
|
|
let(:user) { create(:user) }
|
2017-08-02 15:55:11 -04:00
|
|
|
let(:project) { create(:project) }
|
2017-06-07 14:33:50 -04:00
|
|
|
|
|
|
|
before do
|
2018-07-11 10:36:08 -04:00
|
|
|
project.add_maintainer(user)
|
2017-06-21 19:44:10 -04:00
|
|
|
sign_in(user)
|
2017-06-07 14:33:50 -04:00
|
|
|
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
|
2017-07-06 12:20:50 -04:00
|
|
|
visit project_snippet_path(project, snippet)
|
2017-06-07 14:33:50 -04:00
|
|
|
end
|
|
|
|
|
2017-08-18 06:48:11 -04:00
|
|
|
it_behaves_like 'reportable note', 'snippet'
|
2017-06-07 14:33:50 -04:00
|
|
|
end
|
|
|
|
end
|