Use chartkick globally

* Clean up legacy charting imports
* Update existing donut and line charts
* Create helpers for parsing out existing chart data
* Move chart partials to a more common path
This commit is contained in:
James Mason 2018-12-19 12:59:52 -08:00
parent 3bbac3667f
commit 516e53d9df
29 changed files with 331 additions and 577 deletions

View file

@ -5,8 +5,12 @@ require 'spec_helper'
describe Commercial do
describe '.find_since_last_login' do
let!(:user) do
create(:user, last_sign_in_at: nil)
end
it 'returns none if last_sign_in_at is nil' do
expect(Comment.find_since_last_login(create(:user))).to eq(Comment.none)
expect(Comment.find_since_last_login(user)).to eq(Comment.none)
end
end
end