Skip to content

Commit

Permalink
backend tests complete for MVC - all passing bar spec/controllers/ses…
Browse files Browse the repository at this point in the history
…sions.spec.js
  • Loading branch information
elliepriestley committed Oct 20, 2023
1 parent 46d9aa0 commit a68f643
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"liveServer.settings.port": 5502
}
2 changes: 1 addition & 1 deletion api/spec/controllers/authentication.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const request = require("supertest");
require("../mongodb_helper");
const User = require('../../models/user');

describe.skip("/tokens", () => {
describe("/tokens", () => {
beforeAll(async () => {
const user = new User({ username: 'some_user', email: "[email protected]", password: "12345678" })
console.log(`user before save: ${user}`)
Expand Down
2 changes: 1 addition & 1 deletion api/spec/controllers/sessions.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe("/sessions", () => {
});

// will need to edit this to represent changes to the schema / session model
describe.skip("POST session when token is present", () => {
describe("POST session when token is present", () => {
it('response with a 201 status', async () => {
let response = await request(app)
.post('/sessions')
Expand Down
2 changes: 1 addition & 1 deletion api/spec/lib/token_generator.spec.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const TokenGenerator = require("../../lib/token_generator");
const JWT = require("jsonwebtoken")

describe.skip("TokenGenerator", () => {
describe("TokenGenerator", () => {
describe("jsonwebtoken", () => {
test("returns a token containing user_id that is valid for 20 minutes", () => {
const user_id = 1;
Expand Down

0 comments on commit a68f643

Please sign in to comment.