]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/server/email.ts
Fix from header in contact form
[github/Chocobozzz/PeerTube.git] / server / tests / api / server / email.ts
index f96c57b6636721360a23e2d1145d7fe2602c413b..f8f16f54fce93cfed4afa543b6c97cde3213eb0c 100644 (file)
@@ -89,6 +89,7 @@ describe('Test emails', function () {
 
       const email = emails[0]
 
+      expect(email['from'][0]['name']).equal('localhost:9001')
       expect(email['from'][0]['address']).equal('test-admin@localhost')
       expect(email['to'][0]['address']).equal('user_1@example.com')
       expect(email['subject']).contains('password')
@@ -133,6 +134,7 @@ describe('Test emails', function () {
 
       const email = emails[1]
 
+      expect(email['from'][0]['name']).equal('localhost:9001')
       expect(email['from'][0]['address']).equal('test-admin@localhost')
       expect(email['to'][0]['address']).equal('admin1@example.com')
       expect(email['subject']).contains('abuse')
@@ -152,6 +154,7 @@ describe('Test emails', function () {
 
       const email = emails[2]
 
+      expect(email['from'][0]['name']).equal('localhost:9001')
       expect(email['from'][0]['address']).equal('test-admin@localhost')
       expect(email['to'][0]['address']).equal('user_1@example.com')
       expect(email['subject']).contains(' blocked')
@@ -169,6 +172,7 @@ describe('Test emails', function () {
 
       const email = emails[3]
 
+      expect(email['from'][0]['name']).equal('localhost:9001')
       expect(email['from'][0]['address']).equal('test-admin@localhost')
       expect(email['to'][0]['address']).equal('user_1@example.com')
       expect(email['subject']).contains(' unblocked')
@@ -188,6 +192,7 @@ describe('Test emails', function () {
 
       const email = emails[4]
 
+      expect(email['from'][0]['name']).equal('localhost:9001')
       expect(email['from'][0]['address']).equal('test-admin@localhost')
       expect(email['to'][0]['address']).equal('user_1@example.com')
       expect(email['subject']).contains(' blacklisted')
@@ -205,6 +210,7 @@ describe('Test emails', function () {
 
       const email = emails[5]
 
+      expect(email['from'][0]['name']).equal('localhost:9001')
       expect(email['from'][0]['address']).equal('test-admin@localhost')
       expect(email['to'][0]['address']).equal('user_1@example.com')
       expect(email['subject']).contains(' unblacklisted')
@@ -224,6 +230,7 @@ describe('Test emails', function () {
 
       const email = emails[6]
 
+      expect(email['from'][0]['name']).equal('localhost:9001')
       expect(email['from'][0]['address']).equal('test-admin@localhost')
       expect(email['to'][0]['address']).equal('user_1@example.com')
       expect(email['subject']).contains('Verify')