debian-mirror-gitlab/spec/controllers/admin/health_check_controller_spec.rb

26 lines
525 B
Ruby
Raw Normal View History

2017-09-10 17:25:29 +05:30
require 'spec_helper'
2018-03-17 18:26:18 +05:30
describe Admin::HealthCheckController do
2017-09-10 17:25:29 +05:30
let(:admin) { create(:admin) }
before do
sign_in(admin)
end
describe 'GET show' do
it 'loads the git storage health information' do
get :show
expect(assigns[:failing_storage_statuses]).not_to be_nil
end
end
describe 'POST reset_storage_health' do
it 'resets all storage health information' do
2018-03-17 18:26:18 +05:30
expect(Gitlab::Git::Storage::FailureInfo).to receive(:reset_all!)
2017-09-10 17:25:29 +05:30
post :reset_storage_health
end
end
end