summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/pages/settings_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/gitlab/pages/settings_spec.rb')
-rw-r--r--spec/lib/gitlab/pages/settings_spec.rb32
1 files changed, 4 insertions, 28 deletions
diff --git a/spec/lib/gitlab/pages/settings_spec.rb b/spec/lib/gitlab/pages/settings_spec.rb
index 7d4db073d73..f5424a98153 100644
--- a/spec/lib/gitlab/pages/settings_spec.rb
+++ b/spec/lib/gitlab/pages/settings_spec.rb
@@ -10,38 +10,14 @@ RSpec.describe Gitlab::Pages::Settings do
it { is_expected.to eq('the path') }
- it 'does not track calls' do
- expect(::Gitlab::ErrorTracking).not_to receive(:track_exception)
-
- subject
- end
-
- context 'when running under a web server' do
+ context 'when running under a web server outside of test mode' do
before do
+ allow(::Gitlab::Runtime).to receive(:test_suite?).and_return(false)
allow(::Gitlab::Runtime).to receive(:web_server?).and_return(true)
end
- it { is_expected.to eq('the path') }
-
- it 'does not track calls' do
- expect(::Gitlab::ErrorTracking).not_to receive(:track_exception)
-
- subject
- end
-
- context 'with the env var' do
- before do
- stub_env('GITLAB_PAGES_DENY_DISK_ACCESS', '1')
- end
-
- it { is_expected.to eq('the path') }
-
- it 'tracks a DiskAccessDenied exception' do
- expect(::Gitlab::ErrorTracking).to receive(:track_exception)
- .with(instance_of(described_class::DiskAccessDenied)).and_call_original
-
- subject
- end
+ it 'raises a DiskAccessDenied exception' do
+ expect { subject }.to raise_error(described_class::DiskAccessDenied)
end
end
end