diff options
Diffstat (limited to 'spec/lib/gitlab/diff/file_collection/commit_spec.rb')
-rw-r--r-- | spec/lib/gitlab/diff/file_collection/commit_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/lib/gitlab/diff/file_collection/commit_spec.rb b/spec/lib/gitlab/diff/file_collection/commit_spec.rb index 3d995b36b6f..cfb5f50edbe 100644 --- a/spec/lib/gitlab/diff/file_collection/commit_spec.rb +++ b/spec/lib/gitlab/diff/file_collection/commit_spec.rb @@ -75,4 +75,12 @@ RSpec.describe Gitlab::Diff::FileCollection::Commit do ] end end + + describe '#cache_key' do + subject(:cache_key) { described_class.new(diffable, diff_options: nil).cache_key } + + it 'returns with the commit id' do + expect(cache_key).to eq ['commit', diffable.id] + end + end end |