From f6caec462c9800cb80f1311e9d5f4a624131c3de Mon Sep 17 00:00:00 2001 From: Joellensilva Date: Thu, 19 Dec 2024 15:42:00 -0300 Subject: [PATCH] atualizando testes --- repo/database/postgres.go | 1 - repo/database/postgres_test.go | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/repo/database/postgres.go b/repo/database/postgres.go index 56da037..e3cf2f7 100644 --- a/repo/database/postgres.go +++ b/repo/database/postgres.go @@ -326,7 +326,6 @@ func (p *PostgresDB) GetMonthlyInfo(agencies []models.Agency, year int) (map[str } func (p *PostgresDB) GetAnnualSummary(agency string) ([]models.AnnualSummary, error) { - // var dtoAgmi dto.AgencyMonthlyInfoDTO var dtoAmis []dto.AnnualSummaryDTO agency = strings.ToLower(agency) diff --git a/repo/database/postgres_test.go b/repo/database/postgres_test.go index a4285c6..b45abd4 100644 --- a/repo/database/postgres_test.go +++ b/repo/database/postgres_test.go @@ -788,6 +788,7 @@ func (g getMonthlyInfo) testWhenMonthlyInfoExists(t *testing.T) { Month: 1, CrawlingTimestamp: timestamppb.Now(), ManualCollection: false, + Inconsistent: false, }, { AgencyID: "tjsp", @@ -795,6 +796,7 @@ func (g getMonthlyInfo) testWhenMonthlyInfoExists(t *testing.T) { Month: 1, CrawlingTimestamp: timestamppb.Now(), ManualCollection: true, + Inconsistent: false, }, } if err := insertMonthlyInfos(agmis); err != nil { @@ -1191,6 +1193,7 @@ func (g getOMA) testWhenDataExists(t *testing.T) { assert.Equal(t, agmi.Month, returnedAgmi.Month) assert.Equal(t, agmi.Year, returnedAgmi.Year) assert.Equal(t, agencies[0], *agency) + assert.Equal(t, returnedAgmi.Inconsistent, false) truncateTables() }