-
Notifications
You must be signed in to change notification settings - Fork 0
/
log
50 lines (41 loc) · 1.04 KB
/
log
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
> [email protected] test /home/arsen/WebstormProjects/untitled
> node_modules/mocha/bin/mocha ./test
server started on port 3000
undefined
{ login: 'hasheduser', password: '12345' }
{ login: 'hasheduser', password: '12345' }
connected to DB as id 8
true
userId 13
0
11
undefined
{ login: 'hasheduser',
email: '[email protected]',
password: '12345' }
{ login: 'hasheduser',
email: '[email protected]',
password: '12345' }
true
userId 13
0
11
GET /profile
0
11
✓ should return a 200 response if the user is logged in
✓ should return a 302 response and redirect to /
GET /signup
✓ should return 302 and redirect to /profile
✓ should return 200 and location /signup
POST /signup
✓ Already logged - should return 302 and redirect to /profile
REQ BODY { login: 'hasheduser',
email: '[email protected]',
password: '12345' }
✓ User exists - should return 400 (148ms)
REQ BODY { login: 'newUser',
email: '[email protected]',
password: '12345' }
✓ Sign up success - should return 200 (107ms)
7 passing (796ms)