56de781a2c
This reverts commit e00fb2bdc2090e9cabeb1eb35a2672a882cc96e9. # Conflicts: # .rubocop.yml # .rubocop_todo.yml # lib/gitlab/ci/config/entry/global.rb # lib/gitlab/ci/config/entry/jobs.rb # spec/lib/gitlab/ci/config/entry/factory_spec.rb # spec/lib/gitlab/ci/config/entry/global_spec.rb # spec/lib/gitlab/ci/config/entry/job_spec.rb # spec/lib/gitlab/ci/status/build/factory_spec.rb # spec/lib/gitlab/incoming_email_spec.rb
14 lines
345 B
Ruby
14 lines
345 B
Ruby
require 'spec_helper'
|
|
|
|
describe Email, models: true do
|
|
describe 'validations' do
|
|
it_behaves_like 'an object with email-formated attributes', :email do
|
|
subject { build(:email) }
|
|
end
|
|
end
|
|
|
|
it 'normalize email value' do
|
|
expect(described_class.new(email: ' inFO@exAMPLe.com ').email)
|
|
.to eq 'info@example.com'
|
|
end
|
|
end
|