mirror of
https://github.com/redis/go-redis.git
synced 2025-07-28 06:42:00 +03:00
Move Scan test
This commit is contained in:
@ -283,6 +283,18 @@ var _ = Describe("Client", func() {
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
Expect(got).To(Equal(bigVal))
|
||||
})
|
||||
|
||||
It("should set and scan time", func() {
|
||||
tm := time.Now()
|
||||
err := rdb.Set(ctx, "now", tm, 0).Err()
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
var tm2 time.Time
|
||||
err = rdb.Get(ctx, "now").Scan(&tm2)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
Expect(tm2).To(BeTemporally("==", tm))
|
||||
})
|
||||
})
|
||||
|
||||
var _ = Describe("Client timeout", func() {
|
||||
|
Reference in New Issue
Block a user