Skip to content

Commit

Permalink
Partial spec of error message for readability
Browse files Browse the repository at this point in the history
This avoids Rubocop warnings. We don't need to test for the whole
message. The tested part is unique already and quicker to read.
  • Loading branch information
mkllnk committed Jan 5, 2024
1 parent aebc378 commit 57a6d1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/system/admin/order_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1104,12 +1104,12 @@ def serching_for_customers

# the New invoice button + the warning should be visible
expect(page).to have_link "Create or Update Invoice"
expect(page).to have_content "The order has changed since the last invoice update. The invoice shown here might not be up-to-date anymore."
expect(page).to have_content "The order has changed since the last invoice update."
click_link "Create or Update Invoice"

# and disappear after clicking
expect(page).to have_no_link "Create or Update Invoice"
expect(page).to_not have_content "The order has changed since the last invoice update. The invoice shown here might not be up-to-date anymore."
expect(page).to_not have_content "The order has changed since the last invoice update."

# creating an invoice, displays a second row
expect(page.find("table").text).to have_content(table_contents)
Expand Down

0 comments on commit 57a6d1e

Please sign in to comment.