Sha256: 195231ee3fd8548a961bf12ca7e971d881ec9ba7b1040024e89f4ad94199037b
Contents?: true
Size: 547 Bytes
Versions: 7
Compression:
Stored size: 547 Bytes
Contents
# encoding: UTF-8 require 'devise_zxcvbn/email_tokeniser' describe DeviseZxcvbn::EmailTokeniser do it "should split an email into tokens" do expect(split("joe_bloggs@digital.gov-office.gov.uk")).to eq(%w(joe bloggs digital gov office gov uk)) end it "should not split non-ascii characters" do expect(split("björn@email.com")).to eq(%w(björn email com)) end it "should return empty array when email is nil" do expect(split(nil)).to eq([]) end def split(email) DeviseZxcvbn::EmailTokeniser.split(email) end end
Version data entries
7 entries across 7 versions & 1 rubygems