This commit is contained in:
antanst 2025-07-20 22:38:15 +03:00
parent 3cc9ec2191
commit 78fc2f2bea
3 changed files with 16 additions and 4 deletions

View file

@ -1,3 +1,5 @@
The MIT License (MIT)
Copyright 2024, 2025 Tududi Developers
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

View file

@ -16,8 +16,17 @@ beforeEach(async () => {
try {
// Use raw SQL for faster cleanup
const tableNames = [
'users', 'areas', 'projects', 'tasks', 'tags', 'notes',
'inbox_items', 'task_events', 'tasks_tags', 'notes_tags', 'projects_tags'
'users',
'areas',
'projects',
'tasks',
'tags',
'notes',
'inbox_items',
'task_events',
'tasks_tags',
'notes_tags',
'projects_tags',
];
await sequelize.query('PRAGMA foreign_keys = OFF');

View file

@ -4,7 +4,8 @@ const { User } = require('../../models');
const createTestUser = async (userData = {}) => {
const defaultUser = {
email: 'test@example.com',
password_digest: '$2b$10$DPcA0XSvK9FT04mLyKGza.uHb8d.bESwP.XdQfQ47.sKVT4fYzbP.', // Pre-computed hash for 'password123'
password_digest:
'$2b$10$DPcA0XSvK9FT04mLyKGza.uHb8d.bESwP.XdQfQ47.sKVT4fYzbP.', // Pre-computed hash for 'password123'
...userData,
};