downcase on email adresse for invite object

This commit is contained in:
Xavier J 2016-02-16 16:53:46 +01:00
parent 51c145d2ce
commit 000fadf501
2 changed files with 10 additions and 1 deletions

View file

@ -22,6 +22,15 @@ describe InvitesController, type: :controller do
subject
end
describe 'Invite information' do
let(:email) { 'PLIP@octo.com' }
let(:invite) { Invite.last }
it 'email is on lower case' do
expect(invite.email).to eq 'plip@octo.com'
end
end
it { expect(invite.user).to eq user }
it { expect(flash[:notice]).to be_present }