summaryrefslogtreecommitdiff
path: root/spec/models/compare_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-07-07 18:08:30 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-07-07 18:08:30 +0000
commit59776dd803c7fd9d603086e4ea9356f8aedb0e46 (patch)
tree6cc1065ef86f0680ab8f9dc69cd807ed39ceb221 /spec/models/compare_spec.rb
parente1e58fabfa768f47ab82f87ba50b1f2793a8258a (diff)
downloadgitlab-ce-59776dd803c7fd9d603086e4ea9356f8aedb0e46.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/compare_spec.rb')
-rw-r--r--spec/models/compare_spec.rb10
1 files changed, 9 insertions, 1 deletions
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