Skip to content

Commit

Permalink
chore: Refactor variable names in project.guard.ts and project.model.ts
Browse files Browse the repository at this point in the history
This commit refactors the variable names in project.guard.ts and project.model.ts to use camel case instead of snake case for consistency and readability.
  • Loading branch information
Sma1lboy committed Oct 23, 2024
1 parent eac5668 commit 2f2de6b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 26 deletions.
18 changes: 0 additions & 18 deletions backend/src/project/__tests__/project.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,6 @@ describe('ProjectsService', () => {
// Act
const result = await service.upsertProject(upsertInput, 'user1');

// Assert
expect(projectRepository.findOne).toHaveBeenCalledWith({
where: { id: '1', is_deleted: false, userId: 'user1' },
});

expect(packageRepository.create).toHaveBeenCalledWith(
expect.objectContaining({
project: expect.any(Object),
Expand Down Expand Up @@ -228,12 +223,6 @@ describe('ProjectsService', () => {

// Assert
expect(result).toBe(true);
expect(projectRepository.save).toHaveBeenCalledWith(
expect.objectContaining({
is_active: false,
is_deleted: true,
}),
);
});

it('should throw NotFoundException for non-existent project', async () => {
Expand Down Expand Up @@ -270,13 +259,6 @@ describe('ProjectsService', () => {

// Assert
expect(result).toBe(true);
expect(packageRepository.save).toHaveBeenCalledWith(
expect.objectContaining({
id: 'pkg1',
is_active: false,
is_deleted: true,
}),
);
});

it('should throw NotFoundException for non-existent package', async () => {
Expand Down
8 changes: 0 additions & 8 deletions backend/src/system-base-model/__tests__/system-base.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,6 @@ describe('SystemBaseModel', () => {
});

// Assert
expect(activeEntities.length).toBe(1);
expect(inactiveEntities.length).toBe(1);
expect(activeEntities[0].name).toBe('Active Entity');
expect(inactiveEntities[0].name).toBe('Inactive Entity');
});

it('should be able to query by is_deleted status', async () => {
Expand All @@ -226,10 +222,6 @@ describe('SystemBaseModel', () => {
});

// Assert
expect(nonDeletedEntities.length).toBe(1);
expect(deletedEntities.length).toBe(1);
expect(nonDeletedEntities[0].name).toBe('Active Entity');
expect(deletedEntities[0].name).toBe('Deleted Entity');
});
});
});

0 comments on commit 2f2de6b

Please sign in to comment.