Skip to content

Commit

Permalink
changed variable name
Browse files Browse the repository at this point in the history
changed variable name
  • Loading branch information
e11sy committed Oct 23, 2023
1 parent c85ca2f commit ce0099e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/presentation/http/router/noteList.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import userSessions from '@tests/test-data/userSessions.json';
import { describe, test, expect } from 'vitest';

const refresh_token = userSessions[0]['refresh_tocken'];
const refresh_token = userSessions[0]['refresh_token'];
const access_token = await global.api?.fakeRequest({
method: 'POST',
url: `/auth/?token=${refresh_token}`,
Expand Down
4 changes: 2 additions & 2 deletions src/tests/test-data/userSessions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
"id" : 1,
"user_id" : 4,
"refresh_tocken" : "IqrTkSKmel",
"refresh_tocken_expites_at" : "2023-11-21 19:19:40.911+03"
"refresh_token" : "IqrTkSKmel",
"refresh_token_expites_at" : "2023-11-21 19:19:40.911+03"
}
]
2 changes: 1 addition & 1 deletion src/tests/utils/insert-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ async function insertUsers(db: SequelizeOrm): Promise<void> {
*/
async function insertUserSessions(db: SequelizeOrm): Promise<void> {
for (const userSession of userSessions) {
await db.connection.query(`INSERT INTO public.user_sessions (id, "user_id", "refresh_token", "refresh_token_expires_at") VALUES (${userSession.id}, ${userSession.user_id}, '${userSession.refresh_tocken}', '${userSession.refresh_tocken_expites_at}')`);
await db.connection.query(`INSERT INTO public.user_sessions (id, "user_id", "refresh_token", "refresh_token_expires_at") VALUES (${userSession.id}, ${userSession.user_id}, '${userSession.refresh_token}', '${userSession.refresh_token_expites_at}')`);
}
}
/**
Expand Down

0 comments on commit ce0099e

Please sign in to comment.