Sha256: 60c1a924f7e8af4615978aa0aa7e15d5dae1609278a47f3fc31cc7491a5a4eaf
Contents?: true
Size: 942 Bytes
Versions: 18
Compression:
Stored size: 942 Bytes
Contents
# frozen_string_literal: true require "spec_helper" describe ValidEmail2::Address do describe "#valid?" do it "is valid" do address = described_class.new("foo@bar123.com") expect(address.valid?).to be true end it "is invalid if email is nil" do address = described_class.new(nil) expect(address.valid?).to be false end it "is invalid if email is empty" do address = described_class.new(" ") expect(address.valid?).to be false end it "is invalid if domain is missing" do address = described_class.new("foo") expect(address.valid?).to be false end it "is invalid if email cannot be parsed" do address = described_class.new("<>") expect(address.valid?).to be false end it "is invalid if email contains emoticons" do address = described_class.new("foo🙈@gmail.com") expect(address.valid?).to be false end end end
Version data entries
18 entries across 18 versions & 1 rubygems