-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ca4b532
commit 8aaa4e1
Showing
7 changed files
with
120 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,14 +38,15 @@ describe("api.users.addresses", function(){ | |
email:"[email protected]", | ||
firstname:"first", | ||
lastname:"last", | ||
password:"12345", | ||
confirm:"12345" | ||
password:"123456", | ||
confirm:"123456" | ||
}; | ||
|
||
request(app) | ||
.post('/register') | ||
.send(r) | ||
.end(function(err,res){ | ||
console.log(err) | ||
res.should.have.status(200); | ||
done(); | ||
}); | ||
|
@@ -57,7 +58,7 @@ describe("api.users.addresses", function(){ | |
it('POST /login return 200',function(done){ | ||
request(app) | ||
.post('/login') | ||
.send({ email:"[email protected]", provider:'local', password:'12345' }) | ||
.send({ email:"[email protected]", provider:'local', password:'123456' }) | ||
.end(function(err,res){ | ||
res.should.have.status(200); | ||
res.body.email.address.should.equal("[email protected]"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,8 +44,8 @@ describe("api.users.create", function(){ | |
email:"[email protected]", | ||
firstname:"first", | ||
lastname:"last", | ||
password:"12345", | ||
confirm:"12345" | ||
password:"123456", | ||
confirm:"123456" | ||
}; | ||
|
||
request(app) | ||
|
@@ -62,8 +62,8 @@ describe("api.users.create", function(){ | |
email:"[email protected]", | ||
firstname:"first", | ||
lastname:"last", | ||
password:"12345", | ||
confirm:"12345" | ||
password:"123456", | ||
confirm:"123456" | ||
}; | ||
|
||
request(app) | ||
|
@@ -75,12 +75,12 @@ describe("api.users.create", function(){ | |
}); | ||
}); | ||
|
||
it('POST /register confirmation password should return 400 ',function(done){ | ||
it('POST /register with wrong confirmation password should return 400 ',function(done){ | ||
var r={ | ||
email:"[email protected]", | ||
firstname:"first", | ||
lastname:"last", | ||
password:"12345", | ||
password:"123456", | ||
confirm:"123" | ||
}; | ||
|
||
|
@@ -93,8 +93,9 @@ describe("api.users.create", function(){ | |
}); | ||
}); | ||
|
||
it('POST /register without mail should return 400 ',function(done){ | ||
it('POST /register short password should return 400 ',function(done){ | ||
var r={ | ||
email:"[email protected]", | ||
firstname:"first", | ||
lastname:"last", | ||
password:"12345", | ||
|
@@ -110,6 +111,23 @@ describe("api.users.create", function(){ | |
}); | ||
}); | ||
|
||
it('POST /register without mail should return 400 ',function(done){ | ||
var r={ | ||
firstname:"first", | ||
lastname:"last", | ||
password:"123456", | ||
confirm:"123456" | ||
}; | ||
|
||
request(app) | ||
.post('/register') | ||
.send(r) | ||
.end(function(err,res){ | ||
res.should.have.status(400); | ||
done(); | ||
}); | ||
}); | ||
|
||
it('POST /register without data should return 400 ',function(done){ | ||
request(app) | ||
.post('/register') | ||
|
@@ -123,7 +141,7 @@ describe("api.users.create", function(){ | |
it('POST /login return 200',function(done){ | ||
request(app) | ||
.post('/login') | ||
.send({ email:"[email protected]", provider:'local', password:'12345' }) | ||
.send({ email:"[email protected]", provider:'local', password:'123456' }) | ||
.end(function(err,res){ | ||
res.should.have.status(200); | ||
res.body.email.address.should.equal("[email protected]"); | ||
|
Oops, something went wrong.