docbrown/spec/system/articles/user_deletes_an_article_spec.rb
Lisa Sy 36e271e1cb
Deprecate old button stylings with Crayons buttons (#10694) [deploy]
* Deprecate old buttons.scss file

* Replace outdated button styles with Crayons button styling

* Update additional views after removing old button styling

* Update tests

* Update test

* Update test

* Fix button placements
2020-10-14 07:28:41 -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