Skip to content

Commit

Permalink
add ut
Browse files Browse the repository at this point in the history
  • Loading branch information
倪诗梦 authored and 倪诗梦 committed Sep 12, 2024
1 parent 5f57ab4 commit fc45e38
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ type ExperienceTestSuite struct {
server *egin.Component
db *egorm.Component
dao dao.ExperienceDAO
ctrl *gomock.Controller
}

func (s *ExperienceTestSuite) TearDownTest() {
Expand Down Expand Up @@ -106,7 +105,7 @@ func (s *ExperienceTestSuite) TestSave() {
require.NoError(t, err)
assert.Len(t, experiences, 1)

for i, _ := range experiences {
for i := range experiences {
assert.True(t, experiences[i].Utime > 0)
experiences[i].Utime = 0
assert.True(t, experiences[i].Ctime > 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
"gorm.io/gorm"
)

const uid = 123
//const uid = 123

type ProjectTestSuite struct {
suite.Suite
Expand Down

0 comments on commit fc45e38

Please sign in to comment.