gitlab-org--gitlab-foss/spec/benchmarks/finders/trending_projects_finder_spec.rb
2015-10-06 17:26:32 +02:00

14 lines
395 B
Ruby

require 'spec_helper'
describe TrendingProjectsFinder, benchmark: true do
describe '#execute' do
let(:finder) { described_class.new }
let(:user) { create(:user) }
# to_a is used to force actually running the query (instead of just building
# it).
benchmark_subject { finder.execute(user).non_archived.to_a }
it { is_expected.to iterate_per_second(500) }
end
end