Skip to content

Commit

Permalink
atualizando testes
Browse files Browse the repository at this point in the history
  • Loading branch information
joellensilva committed Dec 19, 2024
1 parent 8fd1caa commit f6caec4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 0 additions & 1 deletion repo/database/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
3 changes: 3 additions & 0 deletions repo/database/postgres_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -788,13 +788,15 @@ func (g getMonthlyInfo) testWhenMonthlyInfoExists(t *testing.T) {
Month: 1,
CrawlingTimestamp: timestamppb.Now(),
ManualCollection: false,
Inconsistent: false,
},
{
AgencyID: "tjsp",
Year: 2020,
Month: 1,
CrawlingTimestamp: timestamppb.Now(),
ManualCollection: true,
Inconsistent: false,
},
}
if err := insertMonthlyInfos(agmis); err != nil {
Expand Down Expand Up @@ -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()
}

Expand Down

0 comments on commit f6caec4

Please sign in to comment.