Skip to content

Commit 012b0c0

Browse files
stefannibrasilcompwron
authored andcommitted
Update text assertions to be case insensitive
Fixes #6786 With this new version, devise errors are now lowercase. To prevent these tests to erroring out again because of uppercase changes, the text are asserted against a case insensitive regex.
1 parent 6922db1 commit 012b0c0

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

spec/system/all_casa_admins/sessions/new_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
click_on "Log in"
5454
end
5555

56-
expect(page).to have_text "Invalid Email or password"
56+
expect(page).to have_text(/invalid email or password/i)
5757
end
5858

5959
it "denies access to flipper" do

spec/system/sessions/login_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
find("#log-in").click
2424
end
2525

26-
expect(page).to have_content("Invalid Email or password.")
26+
expect(page).to have_content(/invalid email or password/i)
2727
end
2828
end
2929
end

spec/system/sessions/new_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
find("#log-in").click
6363
end
6464

65-
expect(page).to have_text "Invalid Email or password"
65+
expect(page).to have_text(/invalid email or password/i)
6666
end
6767
end
6868

0 commit comments

Comments
 (0)