mirror of
https://github.com/redis/go-redis.git
synced 2025-06-14 01:21:30 +03:00
Rename HMSet to HSet and restore old HMSet
This commit is contained in:
@ -1325,7 +1325,7 @@ var _ = Describe("Commands", func() {
|
||||
It("should HIncrByFloat", func() {
|
||||
hSet := client.HSet("hash", "field", "10.50")
|
||||
Expect(hSet.Err()).NotTo(HaveOccurred())
|
||||
Expect(hSet.Val()).To(Equal(true))
|
||||
Expect(hSet.Val()).To(Equal(int64(1)))
|
||||
|
||||
hIncrByFloat := client.HIncrByFloat("hash", "field", 0.1)
|
||||
Expect(hIncrByFloat.Err()).NotTo(HaveOccurred())
|
||||
@ -1333,7 +1333,7 @@ var _ = Describe("Commands", func() {
|
||||
|
||||
hSet = client.HSet("hash", "field", "5.0e3")
|
||||
Expect(hSet.Err()).NotTo(HaveOccurred())
|
||||
Expect(hSet.Val()).To(Equal(false))
|
||||
Expect(hSet.Val()).To(Equal(int64(0)))
|
||||
|
||||
hIncrByFloat = client.HIncrByFloat("hash", "field", 2.0e2)
|
||||
Expect(hIncrByFloat.Err()).NotTo(HaveOccurred())
|
||||
@ -1367,7 +1367,7 @@ var _ = Describe("Commands", func() {
|
||||
})
|
||||
|
||||
It("should HMGet", func() {
|
||||
err := client.HMSet("hash", "key1", "hello1", "key2", "hello2").Err()
|
||||
err := client.HSet("hash", "key1", "hello1", "key2", "hello2").Err()
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
vals, err := client.HMGet("hash", "key1", "key2", "_").Result()
|
||||
@ -1375,8 +1375,8 @@ var _ = Describe("Commands", func() {
|
||||
Expect(vals).To(Equal([]interface{}{"hello1", "hello2", nil}))
|
||||
})
|
||||
|
||||
It("should HMSet", func() {
|
||||
ok, err := client.HMSet("hash", map[string]interface{}{
|
||||
It("should HSet", func() {
|
||||
ok, err := client.HSet("hash", map[string]interface{}{
|
||||
"key1": "hello1",
|
||||
"key2": "hello2",
|
||||
}).Result()
|
||||
@ -1399,7 +1399,7 @@ var _ = Describe("Commands", func() {
|
||||
It("should HSet", func() {
|
||||
hSet := client.HSet("hash", "key", "hello")
|
||||
Expect(hSet.Err()).NotTo(HaveOccurred())
|
||||
Expect(hSet.Val()).To(Equal(true))
|
||||
Expect(hSet.Val()).To(Equal(int64(1)))
|
||||
|
||||
hGet := client.HGet("hash", "key")
|
||||
Expect(hGet.Err()).NotTo(HaveOccurred())
|
||||
|
Reference in New Issue
Block a user