docbrown/spec/system/articles/user_visits_article_stats_spec.rb
Mac Siri 842e6880b8
Routine rubocop fix on /spec (#19217)
* Softrun rubocop

* Hardrun rubocop (-A)

* Change a rubocop rule

* Add missing cops

* Undo & redo rubocop -A
2023-03-21 09:55:26 -04:00

15 lines
417 B
Ruby

require "rails_helper"
RSpec.describe "Viewing an article stats", 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