Commit 1c848436 authored by Kerri Miller's avatar Kerri Miller

Merge branch 'fix-commit-cache-key-again' into 'master'

Fix for cache key oversight

See merge request gitlab-org/gitlab!62081
parents d1c76f02 bd7e25eb
......@@ -160,8 +160,8 @@ module CommitsHelper
commit.author,
ref,
{
merge_request: merge_request,
pipeline_status: commit.status_for(ref),
merge_request: merge_request&.cache_key,
pipeline_status: commit.status_for(ref)&.cache_key,
xhr: request.xhr?,
controller: controller.controller_path,
path: @path # referred to in #link_to_browse_code
......
......@@ -298,7 +298,7 @@ RSpec.describe CommitsHelper do
let(:pipeline) { create(:ci_pipeline, :running) }
let(:user) { create(:user) }
let(:ref) { "master" }
let(:merge_request) { nil }
let(:merge_request) { create(:merge_request) }
let(:request) { double(xhr?: true) }
let(:current_path) { "test" }
......@@ -315,8 +315,8 @@ RSpec.describe CommitsHelper do
it do
is_expected.to include(
{
merge_request: merge_request,
pipeline_status: commit_status,
merge_request: merge_request.cache_key,
pipeline_status: pipeline.cache_key,
xhr: true,
controller: "commits",
path: current_path
......
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