From 46991ee0472f1c27949d16d19b0eee448cfa2521 Mon Sep 17 00:00:00 2001 From: Hamed Asghari Date: Fri, 5 Jan 2024 11:32:29 -0700 Subject: [PATCH] Add specs for email validator strict mode --- spec/models/user_spec.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index dd6b2bd0..ccaf1f54 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -12,6 +12,9 @@ it { is_expected.not_to allow_value("foo").for(:email) } it { is_expected.not_to allow_value("foo@").for(:email) } it { is_expected.not_to allow_value("foo@bar").for(:email) } + it { is_expected.not_to allow_value("foo;@example.com").for(:email) } + it { is_expected.not_to allow_value("foo@.example.com").for(:email) } + it { is_expected.not_to allow_value("foo@example..com").for(:email) } describe "#email" do it "stores email in down case and removes whitespace" do