spec/models/user_spec.rb in clearance-2.7.0 vs spec/models/user_spec.rb in clearance-2.7.2

- old
+ new

@@ -3,18 +3,19 @@ describe User do it { is_expected.to have_db_index(:email) } it { is_expected.to have_db_index(:remember_token) } it { is_expected.to validate_presence_of(:email) } it { is_expected.to validate_presence_of(:password) } - it { is_expected.to allow_value("foo;@example.com").for(:email) } - it { is_expected.to allow_value("foo@.example.com").for(:email) } - it { is_expected.to allow_value("foo@example..com").for(:email) } it { is_expected.to allow_value("foo@example.co.uk").for(:email) } it { is_expected.to allow_value("foo@example.com").for(:email) } it { is_expected.to allow_value("foo+bar@example.com").for(:email) } it { is_expected.not_to allow_value("example.com").for(:email) } 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 user = create(:user, email: "Jo hn.Do e @exa mp le.c om")