mirror of
https://github.com/redis/go-redis.git
synced 2025-06-14 01:21:30 +03:00
@ -2268,6 +2268,20 @@ var _ = Describe("Commands", func() {
|
||||
Expect(lRange.Val()).To(Equal([]string{"one", "two"}))
|
||||
})
|
||||
|
||||
It("should RPopCount", func() {
|
||||
rPush := client.RPush(ctx, "list", "one", "two", "three", "four")
|
||||
Expect(rPush.Err()).NotTo(HaveOccurred())
|
||||
Expect(rPush.Val()).To(Equal(int64(4)))
|
||||
|
||||
rPopCount := client.RPopCount(ctx, "list", 2)
|
||||
Expect(rPopCount.Err()).NotTo(HaveOccurred())
|
||||
Expect(rPopCount.Val()).To(Equal([]string{"four", "three"}))
|
||||
|
||||
lRange := client.LRange(ctx, "list", 0, -1)
|
||||
Expect(lRange.Err()).NotTo(HaveOccurred())
|
||||
Expect(lRange.Val()).To(Equal([]string{"one", "two"}))
|
||||
})
|
||||
|
||||
It("should RPopLPush", func() {
|
||||
rPush := client.RPush(ctx, "list", "one")
|
||||
Expect(rPush.Err()).NotTo(HaveOccurred())
|
||||
|
Reference in New Issue
Block a user