debian-mirror-gitlab/spec/lib/gitlab/middleware/read_only_spec.rb

14 lines
306 B
Ruby
Raw Normal View History

2019-12-04 20:38:33 +05:30
# frozen_string_literal: true
2018-03-17 18:26:18 +05:30
require 'spec_helper'
2020-07-28 23:09:34 +05:30
RSpec.describe Gitlab::Middleware::ReadOnly do
2021-01-29 00:20:46 +05:30
context 'when database is read-only' do
2018-03-17 18:26:18 +05:30
before do
allow(Gitlab::Database).to receive(:read_only?) { true }
end
2021-01-29 00:20:46 +05:30
it_behaves_like 'write access for a read-only GitLab instance'
2018-03-17 18:26:18 +05:30
end
end