FIX: Uncaught promise on link click; fixes broken build

This commit is contained in:
Robin Ward
2014-01-09 16:31:26 -05:00
parent af9b7bfee2
commit ca26d6d0d6
2 changed files with 7 additions and 3 deletions

View File

@ -43,7 +43,9 @@ describe Admin::EmailController do
context 'with an email address' do
it 'enqueues a test email job' do
Jobs.expects(:enqueue).with(:test_email, to_address: 'eviltrout@test.domain')
job_mock = mock
Jobs::TestEmail.expects(:new).returns(job_mock)
job_mock.expects(:execute).with(to_address: 'eviltrout@test.domain')
xhr :post, :test, email_address: 'eviltrout@test.domain'
end
end