* Set up basic /manage route * Add basic article manage page * Add tips and finalize permissions for /manage * Add final test and add manage button to article show * Update failing specs
14 lines
379 B
Ruby
14 lines
379 B
Ruby
require "rails_helper"
|
|
|
|
RSpec.describe "Deleting Article", type: :system do
|
|
let(:article) { create(:article) }
|
|
|
|
it "author of article deletes own article" do
|
|
sign_in article.user
|
|
visit "/dashboard"
|
|
click_on "MANAGE"
|
|
click_on "DELETE"
|
|
click_on "DELETE" # This is for confirming deletion
|
|
expect(page).to have_text("Write your first post now")
|
|
end
|
|
end
|