aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-02-14 11:56:23 +0100
committerChocobozzz <me@florianbigard.com>2019-02-14 11:56:23 +0100
commit7a338188f3ce6c3aa53054afaa936aa807d65fd8 (patch)
tree02af266eee6bf2e7d5f3dd3790e5eb1ed87d4bcf /server/tests/api
parentd4804eead75bfaf41c3150d19e380ff4229d6226 (diff)
downloadPeerTube-7a338188f3ce6c3aa53054afaa936aa807d65fd8.tar.gz
PeerTube-7a338188f3ce6c3aa53054afaa936aa807d65fd8.tar.zst
PeerTube-7a338188f3ce6c3aa53054afaa936aa807d65fd8.zip
Fix from header in contact form
Diffstat (limited to 'server/tests/api')
-rw-r--r--server/tests/api/server/contact-form.ts3
-rw-r--r--server/tests/api/server/email.ts7
2 files changed, 9 insertions, 1 deletions
diff --git a/server/tests/api/server/contact-form.ts b/server/tests/api/server/contact-form.ts
index 93221d0a3..06a2f89b0 100644
--- a/server/tests/api/server/contact-form.ts
+++ b/server/tests/api/server/contact-form.ts
@@ -45,7 +45,8 @@ describe('Test contact form', function () {
45 45
46 const email = emails[0] 46 const email = emails[0]
47 47
48 expect(email['from'][0]['address']).equal('toto@example.com') 48 expect(email['from'][0]['address']).equal('test-admin@localhost')
49 expect(email['from'][0]['name']).equal('toto@example.com')
49 expect(email['to'][0]['address']).equal('admin1@example.com') 50 expect(email['to'][0]['address']).equal('admin1@example.com')
50 expect(email['subject']).contains('Contact form') 51 expect(email['subject']).contains('Contact form')
51 expect(email['text']).contains('my super message') 52 expect(email['text']).contains('my super message')
diff --git a/server/tests/api/server/email.ts b/server/tests/api/server/email.ts
index f96c57b66..f8f16f54f 100644
--- a/server/tests/api/server/email.ts
+++ b/server/tests/api/server/email.ts
@@ -89,6 +89,7 @@ describe('Test emails', function () {
89 89
90 const email = emails[0] 90 const email = emails[0]
91 91
92 expect(email['from'][0]['name']).equal('localhost:9001')
92 expect(email['from'][0]['address']).equal('test-admin@localhost') 93 expect(email['from'][0]['address']).equal('test-admin@localhost')
93 expect(email['to'][0]['address']).equal('user_1@example.com') 94 expect(email['to'][0]['address']).equal('user_1@example.com')
94 expect(email['subject']).contains('password') 95 expect(email['subject']).contains('password')
@@ -133,6 +134,7 @@ describe('Test emails', function () {
133 134
134 const email = emails[1] 135 const email = emails[1]
135 136
137 expect(email['from'][0]['name']).equal('localhost:9001')
136 expect(email['from'][0]['address']).equal('test-admin@localhost') 138 expect(email['from'][0]['address']).equal('test-admin@localhost')
137 expect(email['to'][0]['address']).equal('admin1@example.com') 139 expect(email['to'][0]['address']).equal('admin1@example.com')
138 expect(email['subject']).contains('abuse') 140 expect(email['subject']).contains('abuse')
@@ -152,6 +154,7 @@ describe('Test emails', function () {
152 154
153 const email = emails[2] 155 const email = emails[2]
154 156
157 expect(email['from'][0]['name']).equal('localhost:9001')
155 expect(email['from'][0]['address']).equal('test-admin@localhost') 158 expect(email['from'][0]['address']).equal('test-admin@localhost')
156 expect(email['to'][0]['address']).equal('user_1@example.com') 159 expect(email['to'][0]['address']).equal('user_1@example.com')
157 expect(email['subject']).contains(' blocked') 160 expect(email['subject']).contains(' blocked')
@@ -169,6 +172,7 @@ describe('Test emails', function () {
169 172
170 const email = emails[3] 173 const email = emails[3]
171 174
175 expect(email['from'][0]['name']).equal('localhost:9001')
172 expect(email['from'][0]['address']).equal('test-admin@localhost') 176 expect(email['from'][0]['address']).equal('test-admin@localhost')
173 expect(email['to'][0]['address']).equal('user_1@example.com') 177 expect(email['to'][0]['address']).equal('user_1@example.com')
174 expect(email['subject']).contains(' unblocked') 178 expect(email['subject']).contains(' unblocked')
@@ -188,6 +192,7 @@ describe('Test emails', function () {
188 192
189 const email = emails[4] 193 const email = emails[4]
190 194
195 expect(email['from'][0]['name']).equal('localhost:9001')
191 expect(email['from'][0]['address']).equal('test-admin@localhost') 196 expect(email['from'][0]['address']).equal('test-admin@localhost')
192 expect(email['to'][0]['address']).equal('user_1@example.com') 197 expect(email['to'][0]['address']).equal('user_1@example.com')
193 expect(email['subject']).contains(' blacklisted') 198 expect(email['subject']).contains(' blacklisted')
@@ -205,6 +210,7 @@ describe('Test emails', function () {
205 210
206 const email = emails[5] 211 const email = emails[5]
207 212
213 expect(email['from'][0]['name']).equal('localhost:9001')
208 expect(email['from'][0]['address']).equal('test-admin@localhost') 214 expect(email['from'][0]['address']).equal('test-admin@localhost')
209 expect(email['to'][0]['address']).equal('user_1@example.com') 215 expect(email['to'][0]['address']).equal('user_1@example.com')
210 expect(email['subject']).contains(' unblacklisted') 216 expect(email['subject']).contains(' unblacklisted')
@@ -224,6 +230,7 @@ describe('Test emails', function () {
224 230
225 const email = emails[6] 231 const email = emails[6]
226 232
233 expect(email['from'][0]['name']).equal('localhost:9001')
227 expect(email['from'][0]['address']).equal('test-admin@localhost') 234 expect(email['from'][0]['address']).equal('test-admin@localhost')
228 expect(email['to'][0]['address']).equal('user_1@example.com') 235 expect(email['to'][0]['address']).equal('user_1@example.com')
229 expect(email['subject']).contains('Verify') 236 expect(email['subject']).contains('Verify')