We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d52b11c commit efeb0a2Copy full SHA for efeb0a2
command_test.go
@@ -1,9 +1,10 @@
1
package redis_test
2
3
import (
4
+ "errors"
5
"time"
6
- "github.com/go-redis/redis/v7"
7
+ redis "github.com/go-redis/redis/v7"
8
9
. "github.com/onsi/ginkgo"
10
. "github.com/onsi/gomega"
@@ -84,4 +85,12 @@ var _ = Describe("Cmd", func() {
84
85
Expect(err).NotTo(HaveOccurred())
86
Expect(tm2).To(BeTemporally("==", tm))
87
})
88
+
89
+ It("allow to set custom error", func() {
90
+ e := errors.New("custom error")
91
+ cmd := redis.Cmd{}
92
+ cmd.SetErr(e)
93
+ _, err := cmd.Result()
94
+ Expect(err).To(Equal(e))
95
+ })
96
0 commit comments