1
0
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:
Vladimir Mihailenco
2020-10-13 09:33:12 +03:00
parent f169894120
commit a6876ad84a
2 changed files with 12 additions and 30 deletions

View File

@ -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() {