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.
30 lines
556 B
30 lines
556 B
package push |
|
|
|
import ( |
|
"context" |
|
"testing" |
|
|
|
. "github.com/smartystreets/goconvey/convey" |
|
) |
|
|
|
func TestDao_ZrangeList(t *testing.T) { |
|
Convey("TestDao_ZrangeList", t, WithDao(func(d *Dao) { |
|
data, err := d.ZrangeList(context.TODO()) |
|
So(err, ShouldBeNil) |
|
So(data, ShouldNotBeNil) |
|
Printf("%+v", data) |
|
})) |
|
} |
|
|
|
func TestDao_ZRem(t *testing.T) { |
|
var ( |
|
conn = d.redis.Get(ctx) |
|
key = _pushKey |
|
id = "999" |
|
) |
|
Convey("everything is fine", t, WithDao(func(d *Dao) { |
|
conn.Do("ZADD", key, id) |
|
err := d.ZRem(ctx, id) |
|
So(err, ShouldBeNil) |
|
})) |
|
}
|
|
|