mirror of
https://github.com/redis/go-redis.git
synced 2025-06-12 14:21:52 +03:00
Handle -1 in DurationCmd
This commit is contained in:
@ -374,7 +374,11 @@ var _ = Describe("Commands", func() {
|
||||
|
||||
ttl = client.TTL("key")
|
||||
Expect(ttl.Err()).NotTo(HaveOccurred())
|
||||
Expect(ttl.Val() < 0).To(Equal(true))
|
||||
Expect(ttl.Val()).To(Equal(time.Duration(-1)))
|
||||
|
||||
ttl = client.TTL("nonexistent_key")
|
||||
Expect(ttl.Err()).NotTo(HaveOccurred())
|
||||
Expect(ttl.Val()).To(Equal(time.Duration(-2)))
|
||||
})
|
||||
|
||||
It("should ExpireAt", func() {
|
||||
|
Reference in New Issue
Block a user