summaryrefslogtreecommitdiff
path: root/spec/lib
diff options
context:
space:
mode:
authorAndreas Brandl <abrandl@gitlab.com>2018-10-28 16:53:03 +0100
committerAndreas Brandl <abrandl@gitlab.com>2018-12-03 21:26:48 +0100
commitb6a530c9b14e0f7a1f7ea7717d68a105f4d43409 (patch)
tree6061de9c86319c1bb527b3b9abd5211cb34e612f /spec/lib
parentf2ec9d2d34ebd0650458896af354386c4e73ef26 (diff)
downloadgitlab-ce-b6a530c9b14e0f7a1f7ea7717d68a105f4d43409.tar.gz
Simplify to use models instead of tables.
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/gitlab/database/count_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/lib/gitlab/database/count_spec.rb b/spec/lib/gitlab/database/count_spec.rb
index 3f4e047a9e5..9b4b61d7c94 100644
--- a/spec/lib/gitlab/database/count_spec.rb
+++ b/spec/lib/gitlab/database/count_spec.rb
@@ -25,7 +25,7 @@ describe Gitlab::Database::Count do
context 'with PostgreSQL', :postgresql do
describe 'when reltuples have not been updated' do
it 'counts all models the normal way' do
- expect(described_class).to receive(:reltuples_from_recently_updated).with(%w(projects identities)).and_return({})
+ expect(described_class).to receive(:reltuples_from_recently_updated).with(models).and_return({})
expect(Project).to receive(:count).and_call_original
expect(Identity).to receive(:count).and_call_original
@@ -45,7 +45,7 @@ describe Gitlab::Database::Count do
describe 'when some reltuples have been updated' do
it 'counts projects in the fast way' do
- expect(described_class).to receive(:reltuples_from_recently_updated).with(%w(projects identities)).and_return({ 'projects' => 3 })
+ expect(described_class).to receive(:reltuples_from_recently_updated).with(models).and_return({ Project => 3 })
expect(Project).not_to receive(:count).and_call_original
expect(Identity).to receive(:count).and_call_original