We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2f1b74e commit a2a463bCopy full SHA for a2a463b
redis_test.go
@@ -300,6 +300,18 @@ var _ = Describe("Client", func() {
300
Expect(tm2).To(BeTemporally("==", tm))
301
})
302
303
+ It("should set and scan durations", func() {
304
+ duration := 10 * time.Minute
305
+ err := client.Set(ctx, "duration", duration, 0).Err()
306
+ Expect(err).NotTo(HaveOccurred())
307
+
308
+ var duration2 time.Duration
309
+ err = client.Get(ctx, "duration").Scan(&duration2)
310
311
312
+ Expect(duration2).To(Equal(duration))
313
+ })
314
315
It("should Conn", func() {
316
err := client.Conn(ctx).Get(ctx, "this-key-does-not-exist").Err()
317
Expect(err).To(Equal(redis.Nil))
0 commit comments