-
-
Notifications
You must be signed in to change notification settings - Fork 484
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature(user): improved email already taken message for more clarity …
…message
- Loading branch information
Raushan Kumar Raman
committed
Dec 30, 2024
1 parent
bf19085
commit e948a5e
Showing
2 changed files
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,11 +55,11 @@ | |
expect(user.errors[:base]).to eq([" Date of birth must be on or after 1/1/1920."]) | ||
end | ||
|
||
it 'shows custom email uniqueness error message' do | ||
it "shows custom email uniqueness error message" do | ||
create(:user, email: "[email protected]") | ||
user = build(:user, email: '[email protected]') | ||
user = build(:user, email: "[email protected]") | ||
expect(user.valid?).to be false | ||
expect(user.errors[:base]).to eq ([I18n.t('activerecord.errors.messages.email_uniqueness')]) | ||
expect(user.errors[:base]).to eq([I18n.t("activerecord.errors.messages.email_uniqueness")]) | ||
end | ||
|
||
it "has an empty old_emails array when initialized" do | ||
|