docbrown/spec/system/articles/user_visits_article_stats_spec.rb
Vaidehi Joshi 95055b2a89
Remove pro role + expose analytics to all users via dashboard (#13156)
* Remove pro role on user, expose pro dashboard to all users as analytics

* Remove pro from Elasticsearch mappings

* Update user role docs to use :trusted over :pro

* Remove pro from Role model spec

* Remove more references to pro, as noted by @rhymes
2021-03-30 15:02:18 -07:00

15 lines
432 B
Ruby

require "rails_helper"
RSpec.describe "Viewing an article stats", type: :system, js: true do
let(:user) { create(:user) }
let(:article) { create(:article, user: user) }
it "shows stats for a user by clicking on the stats button" do
path = "/#{user.username}/#{article.slug}/stats"
sign_in user
visit path
expect(page).to have_current_path(path)
expect(page).to have_selector(".summary-stats")
end
end