summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spec/models/repository_spec.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb
index 5e38f8bec16..9c66bbdb5f3 100644
--- a/spec/models/repository_spec.rb
+++ b/spec/models/repository_spec.rb
@@ -149,6 +149,7 @@ describe Repository, models: true do
it "caches #last_commit_id_for_path" do
cache = repository.send(:cache)
key = "last_commit_id_for_path:#{sample_commit.id}:#{Digest::SHA1.hexdigest('.gitignore')}"
+
expect(cache).to receive(:fetch).with(key).and_return('c1acaa5')
expect(repository.cache_last_commit_id_for_path(sample_commit.id, '.gitignore')).to eq('c1acaa5')
end