Skip to content
Snippets Groups Projects
Commit 04b64288 authored by Stan Hu's avatar Stan Hu
Browse files

Disable query limiting warnings for now on GitLab.com

parent 498ade48
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -6,7 +6,7 @@ module Gitlab
# This ensures we don't produce any errors that users can't do anything
# about themselves.
def self.enable?
Gitlab.com? || Rails.env.development? || Rails.env.test?
Rails.env.development? || Rails.env.test?
end
 
# Allows the current request to execute any number of SQL queries.
Loading
Loading
Loading
Loading
@@ -12,14 +12,16 @@ describe Gitlab::QueryLimiting do
expect(described_class.enable?).to eq(true)
end
 
it 'returns true on GitLab.com' do
it 'returns false on GitLab.com' do
expect(Rails.env).to receive(:development?).and_return(false)
expect(Rails.env).to receive(:test?).and_return(false)
allow(Gitlab).to receive(:com?).and_return(true)
 
expect(described_class.enable?).to eq(true)
expect(described_class.enable?).to eq(false)
end
 
it 'returns true in a non GitLab.com' do
expect(Gitlab).to receive(:com?).and_return(false)
it 'returns false in a non GitLab.com' do
allow(Gitlab).to receive(:com?).and_return(false)
expect(Rails.env).to receive(:development?).and_return(false)
expect(Rails.env).to receive(:test?).and_return(false)
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment