1
0
mirror of https://github.com/redis/go-redis.git synced 2025-06-12 14:21:52 +03:00

Add TimeCmd.

This commit is contained in:
Vladimir Mihailenco
2016-10-14 14:39:02 +03:00
parent 6f8957c5b7
commit dcdf129dd5
4 changed files with 79 additions and 7 deletions

View File

@ -159,9 +159,9 @@ var _ = Describe("Commands", func() {
})
It("should Time", func() {
time := client.Time()
Expect(time.Err()).NotTo(HaveOccurred())
Expect(time.Val()).To(HaveLen(2))
tm, err := client.Time().Result()
Expect(err).NotTo(HaveOccurred())
Expect(tm).To(BeTemporally("~", time.Now(), 3*time.Second))
})
})