cohorts_spec.rb 455 Bytes
Newer Older
1 2
require 'rails_helper'

3
describe 'Cohorts page' do
4
  before do
5
    sign_in(create(:admin))
6 7
  end

8
  it 'See users count per month' do
9 10
    2.times { create(:user) }

11
    visit instance_statistics_cohorts_path
12 13 14

    expect(page).to have_content("#{Time.now.strftime('%b %Y')} 3 0")
  end
15 16 17 18 19 20 21 22

  it 'shows usage data', :js do
    visit instance_statistics_cohorts_path

    wait_for_requests

    expect(find('.js-syntax-highlight').text).not_to eq('')
  end
23
end