You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: lib/articles/__tests__/__snapshots__/functional-test.js.snap
+72-72
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,17 @@
1
1
// Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
3
3
exports[`articles DELETE /api/articles/:slug when the user is authenticated and the article is found and the user is not the article author should return a forbidden error 1`] =`
4
-
Object {
5
-
"body": Object{
6
-
"errors": Object{
7
-
"error": Object{
4
+
{
5
+
"body": {
6
+
"errors": {
7
+
"error": {
8
8
"data": null,
9
9
"isBoom": true,
10
10
"isServer": false,
11
11
"message": "Forbidden",
12
-
"output": Object{
13
-
"headers": Object{},
14
-
"payload": Object{
12
+
"output": {
13
+
"headers": {},
14
+
"payload": {
15
15
"error": "Forbidden",
16
16
"message": "Forbidden",
17
17
"statusCode": 403,
@@ -27,24 +27,24 @@ Object {
27
27
`;
28
28
29
29
exports[`articles DELETE /api/articles/:slug when the user is authenticated and the article is found and the user is the article author should delete the article 1`] =`
30
-
Object {
31
-
"body": Object{},
30
+
{
31
+
"body": {},
32
32
"status": 200,
33
33
}
34
34
`;
35
35
36
36
exports[`articles DELETE /api/articles/:slug when the user is authenticated and the article is not found should return a not found error 1`] =`
37
-
Object {
38
-
"body": Object{
39
-
"errors": Object{
40
-
"error": Object{
37
+
{
38
+
"body": {
39
+
"errors": {
40
+
"error": {
41
41
"data": null,
42
42
"isBoom": true,
43
43
"isServer": false,
44
44
"message": "Not Found",
45
-
"output": Object{
46
-
"headers": Object{},
47
-
"payload": Object{
45
+
"output": {
46
+
"headers": {},
47
+
"payload": {
48
48
"error": "Not Found",
49
49
"message": "Not Found",
50
50
"statusCode": 404,
@@ -60,17 +60,17 @@ Object {
60
60
`;
61
61
62
62
exports[`articles DELETE /api/articles/:slug when the user is not authenticated should return an unauthorized error 1`] =`
63
-
Object {
64
-
"body": Object{
65
-
"errors": Object{
66
-
"error": Object{
63
+
{
64
+
"body": {
65
+
"errors": {
66
+
"error": {
67
67
"data": null,
68
68
"isBoom": true,
69
69
"isServer": false,
70
70
"message": "Unauthorized",
71
-
"output": Object{
72
-
"headers": Object{},
73
-
"payload": Object{
71
+
"output": {
72
+
"headers": {},
73
+
"payload": {
74
74
"error": "Unauthorized",
75
75
"message": "Unauthorized",
76
76
"statusCode": 401,
@@ -86,17 +86,17 @@ Object {
86
86
`;
87
87
88
88
exports[`articles GET /api/articles/:slug when the user is authenticated and the article is not found should return a not found error 1`] =`
89
-
Object {
90
-
"body": Object{
91
-
"errors": Object{
92
-
"error": Object{
89
+
{
90
+
"body": {
91
+
"errors": {
92
+
"error": {
93
93
"data": null,
94
94
"isBoom": true,
95
95
"isServer": false,
96
96
"message": "Not Found",
97
-
"output": Object{
98
-
"headers": Object{},
99
-
"payload": Object{
97
+
"output": {
98
+
"headers": {},
99
+
"payload": {
100
100
"error": "Not Found",
101
101
"message": "Not Found",
102
102
"statusCode": 404,
@@ -112,17 +112,17 @@ Object {
112
112
`;
113
113
114
114
exports[`articles GET /api/articles/:slug when the user is not authenticated and the article is not found should return a not found error 1`] =`
115
-
Object {
116
-
"body": Object{
117
-
"errors": Object{
118
-
"error": Object{
115
+
{
116
+
"body": {
117
+
"errors": {
118
+
"error": {
119
119
"data": null,
120
120
"isBoom": true,
121
121
"isServer": false,
122
122
"message": "Not Found",
123
-
"output": Object{
124
-
"headers": Object{},
125
-
"payload": Object{
123
+
"output": {
124
+
"headers": {},
125
+
"payload": {
126
126
"error": "Not Found",
127
127
"message": "Not Found",
128
128
"statusCode": 404,
@@ -138,17 +138,17 @@ Object {
138
138
`;
139
139
140
140
exports[`articles GET /api/articles/feed when the user is not authenticated should return an unauthorized error 1`] =`
141
-
Object {
142
-
"body": Object{
143
-
"errors": Object{
144
-
"error": Object{
141
+
{
142
+
"body": {
143
+
"errors": {
144
+
"error": {
145
145
"data": null,
146
146
"isBoom": true,
147
147
"isServer": false,
148
148
"message": "Unauthorized",
149
-
"output": Object{
150
-
"headers": Object{},
151
-
"payload": Object{
149
+
"output": {
150
+
"headers": {},
151
+
"payload": {
152
152
"error": "Unauthorized",
153
153
"message": "Unauthorized",
154
154
"statusCode": 401,
@@ -164,17 +164,17 @@ Object {
164
164
`;
165
165
166
166
exports[`articles POST /api/articles when the user is not authenticated should return an unauthorized error 1`] =`
167
-
Object {
168
-
"body": Object{
169
-
"errors": Object{
170
-
"error": Object{
167
+
{
168
+
"body": {
169
+
"errors": {
170
+
"error": {
171
171
"data": null,
172
172
"isBoom": true,
173
173
"isServer": false,
174
174
"message": "Unauthorized",
175
-
"output": Object{
176
-
"headers": Object{},
177
-
"payload": Object{
175
+
"output": {
176
+
"headers": {},
177
+
"payload": {
178
178
"error": "Unauthorized",
179
179
"message": "Unauthorized",
180
180
"statusCode": 401,
@@ -190,17 +190,17 @@ Object {
190
190
`;
191
191
192
192
exports[`articles PUT /api/articles/:slug when the user is authenticated and the article is found and the user is not the article author should return a forbidden error 1`] =`
193
-
Object {
194
-
"body": Object{
195
-
"errors": Object{
196
-
"error": Object{
193
+
{
194
+
"body": {
195
+
"errors": {
196
+
"error": {
197
197
"data": null,
198
198
"isBoom": true,
199
199
"isServer": false,
200
200
"message": "Forbidden",
201
-
"output": Object{
202
-
"headers": Object{},
203
-
"payload": Object{
201
+
"output": {
202
+
"headers": {},
203
+
"payload": {
204
204
"error": "Forbidden",
205
205
"message": "Forbidden",
206
206
"statusCode": 403,
@@ -216,17 +216,17 @@ Object {
216
216
`;
217
217
218
218
exports[`articles PUT /api/articles/:slug when the user is authenticated and the article is not found should return a not found error 1`] =`
219
-
Object {
220
-
"body": Object{
221
-
"errors": Object{
222
-
"error": Object{
219
+
{
220
+
"body": {
221
+
"errors": {
222
+
"error": {
223
223
"data": null,
224
224
"isBoom": true,
225
225
"isServer": false,
226
226
"message": "Not Found",
227
-
"output": Object{
228
-
"headers": Object{},
229
-
"payload": Object{
227
+
"output": {
228
+
"headers": {},
229
+
"payload": {
230
230
"error": "Not Found",
231
231
"message": "Not Found",
232
232
"statusCode": 404,
@@ -242,17 +242,17 @@ Object {
242
242
`;
243
243
244
244
exports[`articles PUT /api/articles/:slug when the user is not authenticated should return an unauthorized error 1`] =`
0 commit comments