docbrown/spec/system/comments/user_delete_a_comment_spec.rb
Alex 393ba00221
Remove Elasticsearch ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ (#13606)
* Attempt number 1

* Fix rack_attack specs

* Fix users_searches_users spec

* Fix display_users_search_spec

* Fix comment typo

* Remove search:destroy task from cypress

* Remove port 9300 from gitpod

* Stub response in attack_spec
2021-05-03 11:09:45 -04:00

24 lines
574 B
Ruby

require "rails_helper"
RSpec.describe "Deleting Comment", type: :system, js: true do
let(:user) { create(:user) }
let(:raw_comment) { Faker::Lorem.paragraph }
let(:article) do
create(:article, user_id: user.id, show_comments: true)
end
let(:comment) { create(:comment, commentable: article, commentable_type: "Article", user: user) }
before do
sign_in user
end
it "works" do
visit "/"
visit "#{comment.path}/delete_confirm"
wait_for_javascript
click_button("Delete")
expect(page).to have_current_path(article.path)
end
end