Commit 9c19d157 authored by Manish Kumar's avatar Manish Kumar
Browse files

more backend tests

parent 916aa871
const Joueur = require("../models/joueur.model.js");
exports.auth = (req, res) => {
console.log(req);
Joueur.auth(req.body.email, req.body.mdp, (err, data) => {
if (err) {
if (err.kind === "not_found") {
......
This diff is collapsed.
......@@ -7,7 +7,7 @@ describe("Server responses?", function() {
var url = "http://localhost:3000/checkLogin";
it("returns answer of logging", function(done) {
it("returns negative answer of logging", function(done) {
request.get(url, function(error, response, body) {
var hey = JSON.parse(body);
expect(hey.res).to.equal(false);
......@@ -18,14 +18,13 @@ describe("Server responses?", function() {
});
describe("Showing the friend list? ", function() {
var url = "http://localhost:3000//allfriends";
var url = "http://localhost:3000/allfriends";
it("returns false status", function(done) {
request(url, function(error, response, body) {
request.get(url, function(error, response, body) {
var hey = JSON.parse(body);
expect(hey.rep).to.equal(false);
done();
});
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment