Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec/lib
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-07-24 08:12:42 +0300
committerStan Hu <stanhu@gmail.com>2019-07-24 08:12:42 +0300
commit02a27937255f7815ce8d87ea044d4426848f2841 (patch)
treeaf35c6b080895bbbfca5d86ae0ebb6e0c2fe75b9 /spec/lib
parent291df05e434f5678c47bce9521ff15748d6c767f (diff)
Hide Rugged data if it doesn't exist
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/peek/views/rugged_spec.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/lib/peek/views/rugged_spec.rb b/spec/lib/peek/views/rugged_spec.rb
index 0fc75043df8..715b360953c 100644
--- a/spec/lib/peek/views/rugged_spec.rb
+++ b/spec/lib/peek/views/rugged_spec.rb
@@ -11,6 +11,10 @@ describe Peek::Views::Rugged, :request_store do
allow(Gitlab::RuggedInstrumentation).to receive(:peek_enabled?).and_return(true)
end
+ it 'returns no results' do
+ expect(subject.results).to eq({})
+ end
+
it 'returns aggregated results' do
::Gitlab::RuggedInstrumentation.query_time += 1.234
::Gitlab::RuggedInstrumentation.increment_query_count