mirror of
https://github.com/discourse/discourse.git
synced 2025-05-25 19:29:34 +08:00
FIX: Uncaught promise on link click; fixes broken build
This commit is contained in:
@ -77,7 +77,8 @@ Discourse.ClickTrack = {
|
|||||||
post_id: postId,
|
post_id: postId,
|
||||||
topic_id: topicId,
|
topic_id: topicId,
|
||||||
redirect: false
|
redirect: false
|
||||||
}
|
},
|
||||||
|
dataType: 'html'
|
||||||
});
|
});
|
||||||
window.open(href, '_blank');
|
window.open(href, '_blank');
|
||||||
return false;
|
return false;
|
||||||
@ -91,7 +92,8 @@ Discourse.ClickTrack = {
|
|||||||
post_id: postId,
|
post_id: postId,
|
||||||
topic_id: topicId,
|
topic_id: topicId,
|
||||||
redirect: false
|
redirect: false
|
||||||
}
|
},
|
||||||
|
dataType: 'html'
|
||||||
});
|
});
|
||||||
Discourse.URL.routeTo(href);
|
Discourse.URL.routeTo(href);
|
||||||
return false;
|
return false;
|
||||||
|
@ -43,7 +43,9 @@ describe Admin::EmailController do
|
|||||||
|
|
||||||
context 'with an email address' do
|
context 'with an email address' do
|
||||||
it 'enqueues a test email job' 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'
|
xhr :post, :test, email_address: 'eviltrout@test.domain'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user