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