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.
37 lines
886 B
37 lines
886 B
package service |
|
|
|
// import ( |
|
// "context" |
|
// "testing" |
|
|
|
// . "github.com/smartystreets/goconvey/convey" |
|
// ) |
|
|
|
// func Test_Favorite(t *testing.T) { |
|
// var ( |
|
// aid = int64(9999999) |
|
// mid = int64(88888929) |
|
// fid = int64(0) |
|
// pn = 1 |
|
// ps = 10 |
|
// ) |
|
// Convey("AddFavorite", t, WithService(func(s *Service) { |
|
// err := s.AddFavorite(context.TODO(), mid, aid, fid, "") |
|
// // 11201 means you have added it before. |
|
// So(err, ShouldBeNil) |
|
|
|
// Convey("Favorites", func() { |
|
// res, page, err := s.Favs(context.TODO(), mid, fid, pn, ps, "") |
|
// So(err, ShouldBeNil) |
|
// So(res, ShouldNotBeEmpty) |
|
// So(page, ShouldNotBeEmpty) |
|
// // t.Logf("result: %+v", res) |
|
// // t.Logf("page: %+v", page) |
|
|
|
// Convey("DelFavorite", func() { |
|
// err := s.DelFavorite(context.TODO(), mid, aid, fid, "") |
|
// So(err, ShouldBeNil) |
|
// }) |
|
// }) |
|
// })) |
|
// }
|
|
|