@@ -1367,9 +1367,7 @@ var _ = Describe("Commands", func() {
1367
1367
})
1368
1368
1369
1369
It ("should HMGet" , func () {
1370
- err := client .HSet ("hash" , "key1" , "hello1" ).Err ()
1371
- Expect (err ).NotTo (HaveOccurred ())
1372
- err = client .HSet ("hash" , "key2" , "hello2" ).Err ()
1370
+ err := client .HMSet ("hash" , "key1" , "hello1" , "key2" , "hello2" ).Err ()
1373
1371
Expect (err ).NotTo (HaveOccurred ())
1374
1372
1375
1373
vals , err := client .HMGet ("hash" , "key1" , "key2" , "_" ).Result ()
@@ -1383,7 +1381,7 @@ var _ = Describe("Commands", func() {
1383
1381
"key2" : "hello2" ,
1384
1382
}).Result ()
1385
1383
Expect (err ).NotTo (HaveOccurred ())
1386
- Expect (ok ).To (Equal (int64 (3 )))
1384
+ Expect (ok ).To (Equal (int64 (2 )))
1387
1385
1388
1386
v , err := client .HGet ("hash" , "key1" ).Result ()
1389
1387
Expect (err ).NotTo (HaveOccurred ())
@@ -1392,6 +1390,10 @@ var _ = Describe("Commands", func() {
1392
1390
v , err = client .HGet ("hash" , "key2" ).Result ()
1393
1391
Expect (err ).NotTo (HaveOccurred ())
1394
1392
Expect (v ).To (Equal ("hello2" ))
1393
+
1394
+ keys , err := client .HKeys ("hash" ).Result ()
1395
+ Expect (err ).NotTo (HaveOccurred ())
1396
+ Expect (keys ).To (ConsistOf ([]string {"key1" , "key2" }))
1395
1397
})
1396
1398
1397
1399
It ("should HSet" , func () {
0 commit comments