docbrown/spec/system/articles/user_deletes_an_article_spec.rb
Vaidehi Joshi d2ef01ecc2
Remove Percy (#8915)
We are no longer using the Percy service, so this code is not required anymore.
Removes the percy agent, the gem, and all references to Percy.snapshot and percy: true.
2020-06-25 11:19:58 -07:00

17 lines
408 B
Ruby

require "rails_helper"
RSpec.describe "Deleting Article", type: :system do
let(:article) { create(:article) }
before do
sign_in article.user
visit "/dashboard"
click_on "Manage"
click_on "DELETE"
end
it "author of article deletes own article", js: true do
click_on "DELETE" # This is for confirming deletion
expect(page).to have_text("Write your first post now")
end
end