2019-08-22 06:57:44 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-09-19 03:44:58 -04:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-06-24 14:09:03 -04:00
|
|
|
RSpec.describe Gitlab::Middleware::ReadOnly do
|
2020-11-02 04:08:35 -05:00
|
|
|
context 'when database is read-only' do
|
2017-09-19 03:44:58 -04:00
|
|
|
before do
|
|
|
|
allow(Gitlab::Database).to receive(:read_only?) { true }
|
|
|
|
end
|
|
|
|
|
2020-11-02 04:08:35 -05:00
|
|
|
it_behaves_like 'write access for a read-only GitLab instance'
|
2017-09-19 03:44:58 -04:00
|
|
|
end
|
|
|
|
end
|