gitlab-org--gitlab-foss/spec/features/instance_statistics/cohorts_spec.rb
Stan Hu 85a3b3dff4 Fix spec/features/instance_statistics/cohorts_spec.rb
If one spec disables the usage ping in the in-memory application settings
(e.g. spec/features/usage_stats_consent_spec.rb), then this spec will
fail. To work around this problem, we enable the usage ping explicitly
in the setup phase.

Backport of https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/7290
2018-09-08 00:23:01 -07:00

17 lines
345 B
Ruby

require 'rails_helper'
describe 'Cohorts page' do
before do
sign_in(create(:admin))
stub_application_setting(usage_ping_enabled: true)
end
it 'See users count per month' do
2.times { create(:user) }
visit instance_statistics_cohorts_path
expect(page).to have_content("#{Time.now.strftime('%b %Y')} 3 0")
end
end