item_test.go 559 B

1234567891011121314151617181920
  1. package dao
  2. import (
  3. "context"
  4. "testing"
  5. "github.com/smartystreets/goconvey/convey"
  6. )
  7. func TestItemBillInfo(t *testing.T) {
  8. convey.Convey("ItemBillInfo", t, func() {
  9. itemID := int64(676)
  10. scID := int64(870)
  11. tkID := int64(2843)
  12. infos, _ := d.ItemBillInfo(context.TODO(), []int64{itemID}, []int64{scID}, []int64{tkID})
  13. convey.So(infos.BaseInfo, convey.ShouldContainKey, itemID)
  14. convey.So(infos.BaseInfo[itemID].Screen, convey.ShouldContainKey, scID)
  15. convey.So(infos.BaseInfo[itemID].Screen[scID].Ticket, convey.ShouldContainKey, tkID)
  16. })
  17. }