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.
27 lines
600 B
27 lines
600 B
package dao |
|
|
|
import ( |
|
. "github.com/smartystreets/goconvey/convey" |
|
"go-common/app/service/live/wallet/model" |
|
"testing" |
|
"time" |
|
) |
|
|
|
func TestDao_NewCoinExchangeRecord(t *testing.T) { |
|
Convey("New CoinExchange", t, func() { |
|
once.Do(startService) |
|
record := new(model.CoinExchangeRecord) |
|
record.ExchangeTime = time.Now().Unix() |
|
record.Status = 1 |
|
record.DestNum = 1 |
|
record.DestType = 1 |
|
record.SrcType = 2 |
|
record.SrcNum = 1 |
|
record.TransactionId = "abcdef" |
|
record.Uid = 1 |
|
|
|
affect, err := d.NewCoinExchangeRecord(ctx, record) |
|
So(affect, ShouldEqual, 1) |
|
So(err, ShouldBeNil) |
|
}) |
|
}
|
|
|