Fix jwt-token

This commit is contained in:
2025-09-15 14:49:37 +02:00
parent 3b832752d5
commit ecaff2b6ff
3 changed files with 9 additions and 3 deletions

View File

@@ -8,6 +8,12 @@ process.env.DB_LOGGING = 'false';
const { Sequelize } = require('sequelize');
const path = require('path');
const sinon = require('sinon');
// Global Sinon setup - restore all spies after each test
afterEach(() => {
sinon.restore();
});
// Set additional test environment variables
@@ -121,7 +127,7 @@ async function createTestUser(userData = {}) {
const defaultUserData = {
username: 'testuser',
email: 'test@example.com',
password: 'password123',
password_hash: '$2b$10$dummyHashForTestingOnly',
role: 'admin',
tenant_id: tenant.id,
is_active: true,