fixes specs

This commit is contained in:
rgarcia
2016-08-03 20:05:08 +02:00
parent 63274dfe08
commit 5bd7fdb263
2 changed files with 18 additions and 8 deletions

View File

@@ -201,8 +201,9 @@ feature 'Emails' do
notification2 = create_proposal_notification(proposal2)
notification3 = create_proposal_notification(proposal3)
email_digest = EmailDigest.new
email_digest.create
email_digest = EmailDigest.new(user)
email_digest.deliver
email_digest.mark_as_emailed
email = open_last_email
expect(email).to have_subject("Proposal notifications in Consul")
@@ -227,9 +228,11 @@ feature 'Emails' do
expect(email).to_not have_body_text(proposal3.title)
expect(email).to have_body_text(/#{account_path}/)
end
xscenario "Delete all Notifications included in the digest after email sent" do
notification1.reload
notification2.reload
expect(notification1.emailed_at).to be
expect(notification2.emailed_at).to be
end
end