From 59776dd803c7fd9d603086e4ea9356f8aedb0e46 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 7 Jul 2021 18:08:30 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- spec/models/compare_spec.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'spec/models/compare_spec.rb') diff --git a/spec/models/compare_spec.rb b/spec/models/compare_spec.rb index d395aa359e5..86bab569ab0 100644 --- a/spec/models/compare_spec.rb +++ b/spec/models/compare_spec.rb @@ -13,7 +13,15 @@ RSpec.describe Compare do let(:raw_compare) { Gitlab::Git::Compare.new(project.repository.raw_repository, start_commit.id, head_commit.id) } - subject { described_class.new(raw_compare, project) } + subject(:compare) { described_class.new(raw_compare, project) } + + describe '#cache_key' do + subject { compare.cache_key } + + it { is_expected.to include(project) } + it { is_expected.to include(:compare) } + it { is_expected.to include(compare.diff_refs.hash) } + end describe '#start_commit' do it 'returns raw compare base commit' do -- cgit v1.2.1