summaryrefslogtreecommitdiff
path: root/spec/models/repository_spec.rb
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2019-07-08 21:41:22 -0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2019-07-10 15:04:56 -0300
commit72dee32f460b8f1217e1e92cd4833b2b91b287e0 (patch)
tree415576ad6a02ae7cef07aaf7cb34a6f0a9313e03 /spec/models/repository_spec.rb
parent2d9cd76f4f7319a9f4cafc5a01e6b5f29d3cb1fc (diff)
downloadgitlab-ce-72dee32f460b8f1217e1e92cd4833b2b91b287e0.tar.gz
Upgrade rspec-rails to 3.8.2 and dependenciessh-bump-rspec-versions
This brings the rspec-core version in line with the Gitaly changes and introduces Rails 5.1/5.2 improvements. Full CHANGELOG: https://github.com/rspec/rspec-rails/blob/master/Changelog.md
Diffstat (limited to 'spec/models/repository_spec.rb')
-rw-r--r--spec/models/repository_spec.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb
index 3d967aa4ab8..12dff440ce2 100644
--- a/spec/models/repository_spec.rb
+++ b/spec/models/repository_spec.rb
@@ -2426,16 +2426,15 @@ describe Repository do
# Gets the commit oid, and warms the cache
oid = project.commit.id
- expect(Gitlab::Git::Commit).not_to receive(:find).once
+ expect(Gitlab::Git::Commit).to receive(:find).once
- project.commit_by(oid: oid)
+ 2.times { project.commit_by(oid: oid) }
end
it 'caches nil values' do
expect(Gitlab::Git::Commit).to receive(:find).once
- project.commit_by(oid: '1' * 40)
- project.commit_by(oid: '1' * 40)
+ 2.times { project.commit_by(oid: '1' * 40) }
end
end