forked from mholt/binding
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patherrors_test.go
59 lines (31 loc) · 1015 Bytes
/
errors_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package binding
import (
"testing"
. "github.com/smartystreets/goconvey/convey"
)
func TestErrorAdd(t *testing.T) {
Convey("When using Add to add an error to the slice", t, func() {
Convey("The slice should be the correct size", nil)
Convey("The slice should have that error", nil)
})
}
func TestErrorsLen(t *testing.T) {
Convey("When using Len to get the error count", t, func() {
Convey("It should return the correct value", nil)
})
}
func TestErrorsHas(t *testing.T) {
Convey("When checking for an error classification that exists", t, func() {
Convey("Has should return true", nil)
})
Convey("When checking for an error classification that doesn't exist", t, func() {
Convey("Has should return false", nil)
})
}
func TestErrorGetters(t *testing.T) {
Convey("Given a simple Errors instance", t, func() {
Convey("Fields should return the fields", nil)
Convey("Kind should return the classification", nil)
Convey("Error should return the message", nil)
})
}