Skip to content

Commit

Permalink
Change equal asserts on time structs to deep-equal
Browse files Browse the repository at this point in the history
Signed-off-by: Babak K. Shandiz <[email protected]>
  • Loading branch information
babakks committed Sep 5, 2023
1 parent 2d0eae9 commit f5592ad
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/db/secrets_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func (s *dbSuite) TestInsertSecret(c *qt.C) {
secret := dbmodel.Secret{}
tx := s.Database.DB.First(&secret)
c.Assert(tx.Error, qt.IsNil)
c.Assert(secret.Time, qt.Equals, testTime)
c.Assert(secret.Time, qt.DeepEquals, testTime)
c.Assert(secret.Type, qt.Equals, "generic")
c.Assert(secret.Tag, qt.Equals, "123")
c.Assert(secret.Data, qt.IsNil)
Expand Down Expand Up @@ -61,7 +61,7 @@ func (s *dbSuite) TestUpsertSecret(c *qt.C) {
secret := dbmodel.Secret{}
tx := s.Database.DB.First(&secret)
c.Assert(tx.Error, qt.IsNil)
c.Assert(secret.Time, qt.Equals, newTime)
c.Assert(secret.Time, qt.DeepEquals, newTime)
c.Assert([]byte(secret.Data), qt.DeepEquals, []byte("123"))
}

Expand All @@ -79,7 +79,7 @@ func (s *dbSuite) TestGetSecret(c *qt.C) {
c.Assert(s.Database.DB.Create(&u).Error, qt.IsNil)
secret := dbmodel.Secret{Type: "generic", Tag: "123"}
c.Assert(s.Database.GetSecret(ctx, &secret), qt.IsNil)
c.Assert(secret.Time, qt.Equals, testTime)
c.Assert(secret.Time, qt.DeepEquals, testTime)
c.Assert(secret.Type, qt.Equals, "generic")
c.Assert(secret.Tag, qt.Equals, "123")
}
Expand Down

0 comments on commit f5592ad

Please sign in to comment.