gitlab-org--gitlab-foss/spec/features/instance_statistics/instance_statistics_spec.rb
Sean McGivern c4a8f45f7d Rename broken spec files
RSpec only executes files ending in _spec.rb.
2019-08-01 11:07:27 +01:00

25 lines
595 B
Ruby

# frozen_string_literal: true
require 'rails_helper'
describe 'Cohorts page', :js do
before do
sign_in(create(:admin))
end
it 'hides cohorts nav button when usage ping is disabled' do
stub_application_setting(usage_ping_enabled: false)
visit instance_statistics_root_path
expect(find('.nav-sidebar')).not_to have_content('Cohorts')
end
it 'shows cohorts nav button when usage ping is enabled' do
stub_application_setting(usage_ping_enabled: true)
visit instance_statistics_root_path
expect(find('.nav-sidebar')).to have_content('Cohorts')
end
end