1
0
Fork 0

Fix specs style

This commit is contained in:
Alex Kotov 2019-10-09 11:48:58 +05:00
parent 0c2d891d4f
commit 227cd80349
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
2 changed files with 8 additions and 2 deletions

View File

@ -4,14 +4,20 @@ require 'rails_helper'
RSpec.describe NotificationMailer do
describe '#signed_in' do
let(:mail) { NotificationMailer.signed_in email, session }
let(:mail) { described_class.signed_in email, session }
let(:email) { Faker::Internet.email }
let(:session) { create :some_session }
it 'renders the headers' do
it 'has subject' do
expect(mail.subject).to eq '[LPR Alert]: Произведён вход в ваш аккаунт'
end
it 'has source' do
expect(mail.from).to eq ['no-reply@libertarian-party.com']
end
it 'has destination' do
expect(mail.to).to eq [email]
end