Commit 48a0e9f6 authored by Douwe Maan's avatar Douwe Maan

Fix specs

parent 1817f877
......@@ -61,7 +61,6 @@ class Projects::CompareController < Projects::ApplicationController
@environment = EnvironmentsFinder.new(@project, current_user, environment_params).execute.last
@diff_notes_disabled = true
@grouped_diff_discussions = {}
end
end
......
......@@ -122,7 +122,6 @@ class Projects::MergeRequestsController < Projects::ApplicationController
build_merge_request
@diffs = @merge_request.diffs(diff_options)
@diff_notes_disabled = true
@grouped_diff_discussions = {}
end
define_commit_vars
......@@ -576,10 +575,13 @@ class Projects::MergeRequestsController < Projects::ApplicationController
@comparable_diffs = @merge_request_diffs.select { |diff| diff.id < @merge_request_diff.id }
if params[:start_sha].present?
start_sha = params[:start_sha]
@start_version = @comparable_diffs.find { |diff| diff.head_commit_sha == start_sha }
@start_sha = params[:start_sha]
@start_version = @comparable_diffs.find { |diff| diff.head_commit_sha == @start_sha }
@start_sha = start_sha if @start_version
unless @start_version
@start_sha = @merge_request_diff.head_commit_sha
@start_version = @merge_request_diff
end
end
@diffs =
......
......@@ -62,6 +62,8 @@ module DiffHelper
end
def parallel_diff_discussions(left, right, diff_file)
return unless @grouped_diff_discussions
discussions_left = discussions_right = nil
if left && (left.unchanged? || left.removed?)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment