+ describe('When creating a video abuse', function () {
+ it('Should send the notification email', async function () {
+ this.timeout(10000)
+
+ const reason = 'my super bad reason'
+ await reportVideoAbuse(server.url, server.accessToken, videoUUID, reason)
+
+ await wait(3000)
+ expect(emails).to.have.lengthOf(2)
+
+ const email = emails[1]
+
+ expect(email['from'][0]['address']).equal('test-admin@localhost')
+ expect(email['to'][0]['address']).equal('admin1@example.com')
+ expect(email['subject']).contains('abuse')
+ expect(email['text']).contains(videoUUID)
+ })
+ })
+