aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params/user-notifications.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/check-params/user-notifications.ts')
-rw-r--r--server/tests/api/check-params/user-notifications.ts32
1 files changed, 16 insertions, 16 deletions
diff --git a/server/tests/api/check-params/user-notifications.ts b/server/tests/api/check-params/user-notifications.ts
index 038c444b3..3b709ee5a 100644
--- a/server/tests/api/check-params/user-notifications.ts
+++ b/server/tests/api/check-params/user-notifications.ts
@@ -2,7 +2,7 @@
2 2
3import 'mocha' 3import 'mocha'
4import { io } from 'socket.io-client' 4import { io } from 'socket.io-client'
5import { HttpStatusCode } from '@shared/core-utils' 5import { HttpStatusCode } from '@shared/models'
6import { 6import {
7 checkBadCountPagination, 7 checkBadCountPagination,
8 checkBadSortPagination, 8 checkBadSortPagination,
@@ -54,7 +54,7 @@ describe('Test user notifications API validators', function () {
54 unread: 'toto' 54 unread: 'toto'
55 }, 55 },
56 token: server.accessToken, 56 token: server.accessToken,
57 statusCodeExpected: HttpStatusCode.OK_200 57 expectedStatus: HttpStatusCode.OK_200
58 }) 58 })
59 }) 59 })
60 60
@@ -62,7 +62,7 @@ describe('Test user notifications API validators', function () {
62 await makeGetRequest({ 62 await makeGetRequest({
63 url: server.url, 63 url: server.url,
64 path, 64 path,
65 statusCodeExpected: HttpStatusCode.UNAUTHORIZED_401 65 expectedStatus: HttpStatusCode.UNAUTHORIZED_401
66 }) 66 })
67 }) 67 })
68 68
@@ -71,7 +71,7 @@ describe('Test user notifications API validators', function () {
71 url: server.url, 71 url: server.url,
72 path, 72 path,
73 token: server.accessToken, 73 token: server.accessToken,
74 statusCodeExpected: HttpStatusCode.OK_200 74 expectedStatus: HttpStatusCode.OK_200
75 }) 75 })
76 }) 76 })
77 }) 77 })
@@ -87,7 +87,7 @@ describe('Test user notifications API validators', function () {
87 ids: [ 'hello' ] 87 ids: [ 'hello' ]
88 }, 88 },
89 token: server.accessToken, 89 token: server.accessToken,
90 statusCodeExpected: HttpStatusCode.BAD_REQUEST_400 90 expectedStatus: HttpStatusCode.BAD_REQUEST_400
91 }) 91 })
92 92
93 await makePostBodyRequest({ 93 await makePostBodyRequest({
@@ -97,7 +97,7 @@ describe('Test user notifications API validators', function () {
97 ids: [ ] 97 ids: [ ]
98 }, 98 },
99 token: server.accessToken, 99 token: server.accessToken,
100 statusCodeExpected: HttpStatusCode.BAD_REQUEST_400 100 expectedStatus: HttpStatusCode.BAD_REQUEST_400
101 }) 101 })
102 102
103 await makePostBodyRequest({ 103 await makePostBodyRequest({
@@ -107,7 +107,7 @@ describe('Test user notifications API validators', function () {
107 ids: 5 107 ids: 5
108 }, 108 },
109 token: server.accessToken, 109 token: server.accessToken,
110 statusCodeExpected: HttpStatusCode.BAD_REQUEST_400 110 expectedStatus: HttpStatusCode.BAD_REQUEST_400
111 }) 111 })
112 }) 112 })
113 113
@@ -118,7 +118,7 @@ describe('Test user notifications API validators', function () {
118 fields: { 118 fields: {
119 ids: [ 5 ] 119 ids: [ 5 ]
120 }, 120 },
121 statusCodeExpected: HttpStatusCode.UNAUTHORIZED_401 121 expectedStatus: HttpStatusCode.UNAUTHORIZED_401
122 }) 122 })
123 }) 123 })
124 124
@@ -130,7 +130,7 @@ describe('Test user notifications API validators', function () {
130 ids: [ 5 ] 130 ids: [ 5 ]
131 }, 131 },
132 token: server.accessToken, 132 token: server.accessToken,
133 statusCodeExpected: HttpStatusCode.NO_CONTENT_204 133 expectedStatus: HttpStatusCode.NO_CONTENT_204
134 }) 134 })
135 }) 135 })
136 }) 136 })
@@ -142,7 +142,7 @@ describe('Test user notifications API validators', function () {
142 await makePostBodyRequest({ 142 await makePostBodyRequest({
143 url: server.url, 143 url: server.url,
144 path, 144 path,
145 statusCodeExpected: HttpStatusCode.UNAUTHORIZED_401 145 expectedStatus: HttpStatusCode.UNAUTHORIZED_401
146 }) 146 })
147 }) 147 })
148 148
@@ -151,7 +151,7 @@ describe('Test user notifications API validators', function () {
151 url: server.url, 151 url: server.url,
152 path, 152 path,
153 token: server.accessToken, 153 token: server.accessToken,
154 statusCodeExpected: HttpStatusCode.NO_CONTENT_204 154 expectedStatus: HttpStatusCode.NO_CONTENT_204
155 }) 155 })
156 }) 156 })
157 }) 157 })
@@ -183,7 +183,7 @@ describe('Test user notifications API validators', function () {
183 path, 183 path,
184 token: server.accessToken, 184 token: server.accessToken,
185 fields: { newVideoFromSubscription: UserNotificationSettingValue.WEB }, 185 fields: { newVideoFromSubscription: UserNotificationSettingValue.WEB },
186 statusCodeExpected: HttpStatusCode.BAD_REQUEST_400 186 expectedStatus: HttpStatusCode.BAD_REQUEST_400
187 }) 187 })
188 }) 188 })
189 189
@@ -196,7 +196,7 @@ describe('Test user notifications API validators', function () {
196 path, 196 path,
197 token: server.accessToken, 197 token: server.accessToken,
198 fields, 198 fields,
199 statusCodeExpected: HttpStatusCode.BAD_REQUEST_400 199 expectedStatus: HttpStatusCode.BAD_REQUEST_400
200 }) 200 })
201 } 201 }
202 202
@@ -208,7 +208,7 @@ describe('Test user notifications API validators', function () {
208 path, 208 path,
209 fields, 209 fields,
210 token: server.accessToken, 210 token: server.accessToken,
211 statusCodeExpected: HttpStatusCode.BAD_REQUEST_400 211 expectedStatus: HttpStatusCode.BAD_REQUEST_400
212 }) 212 })
213 } 213 }
214 }) 214 })
@@ -218,7 +218,7 @@ describe('Test user notifications API validators', function () {
218 url: server.url, 218 url: server.url,
219 path, 219 path,
220 fields: correctFields, 220 fields: correctFields,
221 statusCodeExpected: HttpStatusCode.UNAUTHORIZED_401 221 expectedStatus: HttpStatusCode.UNAUTHORIZED_401
222 }) 222 })
223 }) 223 })
224 224
@@ -228,7 +228,7 @@ describe('Test user notifications API validators', function () {
228 path, 228 path,
229 token: server.accessToken, 229 token: server.accessToken,
230 fields: correctFields, 230 fields: correctFields,
231 statusCodeExpected: HttpStatusCode.NO_CONTENT_204 231 expectedStatus: HttpStatusCode.NO_CONTENT_204
232 }) 232 })
233 }) 233 })
234 }) 234 })