Sha256: 4b227ee6da7f1203177d0f0c6ea8a0ffd84f870af89ffd8d1d2c3a1a0a81a985

Contents?: true

Size: 478 Bytes

Versions: 1

Compression:

Stored size: 478 Bytes

Contents

describe 'Email validation' do
  it 'passes on valid emails' do
    expect(Citizenship.valid_email?('user@example.org')).to be_truthy
  end

  it 'falid on invalid emails' do
    expect {Citizenship.valid_email!(' user@example.org')}.to raise_error(Citizenship::EmailError)
    expect(Citizenship.valid_email?('user@example.org ')).to be_falsy
    expect(Citizenship.valid_email?('email@')).to be_falsy
    expect(Citizenship.valid_email?('@example.com')).to be_falsy
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
citizenship-1.0.0 spec/citizenship/email_spec.rb