include all expected instance vars for _show.html.haml template within tests
This commit is contained in:
parent
0ea5483311
commit
6e7e505237
2 changed files with 7 additions and 2 deletions
|
@ -20,4 +20,4 @@
|
|||
to post a comment
|
||||
|
||||
:javascript
|
||||
var notes = new Notes("#{namespace_project_notes_path(namespace_id: @project.namespace, target_id: @noteable.id, target_type: @noteable.class.name.underscore)}", #{@notes.map(&:id).to_json}, #{Time.now.to_i}, "#{diff_view}")
|
||||
var notes = new Notes("#{namespace_project_notes_path(namespace_id: @project.namespace, project_id: @project, target_id: @noteable.id, target_type: @noteable.class.name.underscore)}", #{@notes.map(&:id).to_json}, #{Time.now.to_i}, "#{diff_view}")
|
||||
|
|
|
@ -7,6 +7,7 @@ describe 'projects/merge_requests/show.html.haml' do
|
|||
let(:project) { create(:project) }
|
||||
let(:fork_project) { create(:project, forked_from_project: project) }
|
||||
let(:unlink_project) { Projects::UnlinkForkService.new(fork_project, user) }
|
||||
let(:note) { create(:note_on_merge_request, project: project, noteable: closed_merge_request) }
|
||||
|
||||
let(:closed_merge_request) do
|
||||
create(:closed_merge_request,
|
||||
|
@ -19,8 +20,12 @@ describe 'projects/merge_requests/show.html.haml' do
|
|||
assign(:project, project)
|
||||
assign(:merge_request, closed_merge_request)
|
||||
assign(:commits_count, 0)
|
||||
assign(:note, note)
|
||||
assign(:noteable, closed_merge_request)
|
||||
assign(:notes, [])
|
||||
assign(:pipelines, Ci::Pipeline.none)
|
||||
|
||||
allow(view).to receive(:can?).and_return(true)
|
||||
allow(view).to receive_messages(current_user: user, can?: true)
|
||||
end
|
||||
|
||||
context 'when the merge request is closed' do
|
||||
|
|
Loading…
Reference in a new issue