Flaky Spec Fix: Dont CGI Escape Title Compare (#8714)

This commit is contained in:
Molly Struve 2020-06-16 14:19:41 -05:00 committed by GitHub
parent 58f9c303aa
commit 6cc4c6fe4a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -38,9 +38,9 @@ RSpec.describe "User visits articles by tag", type: :system do
it "shows the correct articles" do
within("#articles-list") do
expect(page).to have_text(CGI.escapeHTML(article.title))
expect(page).to have_text(CGI.escapeHTML(article3.title))
expect(page).not_to have_text(CGI.escapeHTML(article2.title))
expect(page).to have_text(article.title)
expect(page).to have_text(article3.title)
expect(page).not_to have_text(article2.title)
end
end
@ -48,9 +48,9 @@ RSpec.describe "User visits articles by tag", type: :system do
click_on "WEEK"
within("#articles-list") do
expect(page).to have_text(CGI.escapeHTML(article.title))
expect(page).not_to have_text(CGI.escapeHTML(article3.title))
expect(page).not_to have_text(CGI.escapeHTML(article2.title))
expect(page).to have_text(article.title)
expect(page).not_to have_text(article3.title)
expect(page).not_to have_text(article2.title)
end
end
end