health_check_controller_spec.rb 525 Bytes
Newer Older
1 2
require 'spec_helper'

3
describe Admin::HealthCheckController do
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
  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
20
      expect(Gitlab::Git::Storage::FailureInfo).to receive(:reset_all!)
21 22 23 24 25

      post :reset_storage_health
    end
  end
end