up_account_test.go 809 B

123456789101112131415161718192021222324252627282930313233343536
  1. package income
  2. import (
  3. "context"
  4. "testing"
  5. . "github.com/smartystreets/goconvey/convey"
  6. )
  7. func Test_UpAccounts(t *testing.T) {
  8. Convey("UpAccounts", t, func() {
  9. _, _, err := d.UpAccounts(context.Background(), 0, 2000)
  10. So(err, ShouldBeNil)
  11. })
  12. }
  13. func Test_UpAccount(t *testing.T) {
  14. Convey("UpAccount", t, func() {
  15. _, err := d.UpAccount(context.Background(), 123)
  16. So(err, ShouldBeNil)
  17. })
  18. }
  19. func Test_InsertUpAccount(t *testing.T) {
  20. Convey("InsertUpAccount", t, func() {
  21. _, err := d.InsertUpAccount(context.Background(), "(123,1,100,300,2018-05,22)")
  22. So(err, ShouldBeNil)
  23. })
  24. }
  25. func Test_UpdateUpAccount(t *testing.T) {
  26. Convey("UpdateUpAccount", t, func() {
  27. _, err := d.UpdateUpAccount(context.Background(), int64(100), int64(22), int64(123), int64(100))
  28. So(err, ShouldBeNil)
  29. })
  30. }