mirror of
https://github.com/redis/go-redis.git
synced 2025-07-28 06:42:00 +03:00
Add HMSetMap.
This commit is contained in:
committed by
Vladimir Mihailenco
parent
6528f68108
commit
c53e5feb3b
@ -1195,6 +1195,23 @@ var _ = Describe("Commands", func() {
|
||||
Expect(hGet.Val()).To(Equal("hello2"))
|
||||
})
|
||||
|
||||
It("should HMSetMap", func() {
|
||||
hMSetMap := client.HMSetMap("hash", map[string]string{
|
||||
"key3": "hello3",
|
||||
"key4": "hello4",
|
||||
})
|
||||
Expect(hMSetMap.Err()).NotTo(HaveOccurred())
|
||||
Expect(hMSetMap.Val()).To(Equal("OK"))
|
||||
|
||||
hGet := client.HGet("hash", "key3")
|
||||
Expect(hGet.Err()).NotTo(HaveOccurred())
|
||||
Expect(hGet.Val()).To(Equal("hello3"))
|
||||
|
||||
hGet = client.HGet("hash", "key4")
|
||||
Expect(hGet.Err()).NotTo(HaveOccurred())
|
||||
Expect(hGet.Val()).To(Equal("hello4"))
|
||||
})
|
||||
|
||||
It("should HSet", func() {
|
||||
hSet := client.HSet("hash", "key", "hello")
|
||||
Expect(hSet.Err()).NotTo(HaveOccurred())
|
||||
|
Reference in New Issue
Block a user