Skip to content

Commit

Permalink
Fix pending spec example and clarify displayed content
Browse files Browse the repository at this point in the history
  • Loading branch information
mkllnk committed Nov 14, 2023
1 parent b626ec1 commit 58d2e9d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spec/system/consumer/shopping/products_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@

# It truncates a long product description.
within_product_description(product) do
expect(html).to include product.description
expect(html).to include "<b>Formatted</b> product description: Lorem ipsum"
expect(page).to have_content "..."
end
within_product_modal(product) do
Expand All @@ -105,10 +105,12 @@
within_product_description(product) do
expect(html).to include "<p>Safe</p>"
expect(html).not_to include "<script>alert('Dangerous!');</script>"
expect(page).to have_content "alert('Dangerous!'); Safe"
end
within_product_modal(product) do
expect(html).to include "<p>Safe</p>"
expect(html).not_to include "<script>alert('Dangerous!');</script>"
expect(page).to have_content "alert('Dangerous!'); Safe"
end
end
end
Expand Down

0 comments on commit 58d2e9d

Please sign in to comment.