You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
510 B
26 lines
510 B
package service |
|
|
|
import ( |
|
"context" |
|
"encoding/json" |
|
"testing" |
|
|
|
. "github.com/smartystreets/goconvey/convey" |
|
) |
|
|
|
func TestRecoverIdx(t *testing.T) { |
|
var c = context.Background() |
|
Convey("recover idx", t, WithService(func(s *Service) { |
|
var d struct { |
|
Oid int64 `json:"oid"` |
|
Tp int8 `json:"tp"` |
|
Count int `json:"count"` |
|
Floor int `json:"floor"` |
|
} |
|
d.Oid = 78 |
|
d.Tp = 2 |
|
d.Count = 20 |
|
content, _ := json.Marshal(&d) |
|
s.acionRecoverFloorIdx(c, &consumerMsg{Data: content}) |
|
})) |
|
}
|
|
|