Skip to content

Commit

Permalink
correct test
Browse files Browse the repository at this point in the history
  • Loading branch information
fufeck committed Dec 10, 2024
1 parent 6b1c1ce commit a649968
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apps/api/src/modules/numeros/numero.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ export class NumeroService {
const query = this.numerosRepository
.createQueryBuilder('numeros')
.select('numeros.voie_id', 'id')
.addSelect('count(numeros.id)', 'nbNumeros')
.addSelect('count(numeros.id)::int', 'nbNumeros')
.addSelect(
'count(CASE WHEN numeros.certifie THEN true END)',
'count(CASE WHEN numeros.certifie THEN true END)::int',
'nbNumerosCertifies',
)
.addSelect(
Expand All @@ -117,9 +117,9 @@ export class NumeroService {
const query = this.numerosRepository
.createQueryBuilder('numeros')
.select('numeros.voie_id', 'id')
.addSelect('count(numeros.id)', 'nbNumeros')
.addSelect('count(numeros.id)::int', 'nbNumeros')
.addSelect(
'count(CASE WHEN numeros.certifie THEN true END)',
'count(CASE WHEN numeros.certifie THEN true END)::int',
'nbNumerosCertifies',
)
.addSelect(
Expand Down
1 change: 1 addition & 0 deletions apps/api/test/base_locale.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1122,6 +1122,7 @@ describe('BASE LOCAL MODULE', () => {
expect(response.body[0].nbNumeros).toEqual(2);
expect(response.body[0].nbNumerosCertifies).toEqual(1);
expect(response.body[0].isAllCertified).toBeFalsy();
expect(response.body[0].commentedNumeros).toBeNull();
});
});

Expand Down

0 comments on commit a649968

Please sign in to comment.