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 cadb6f7 commit b8a257eCopy full SHA for b8a257e
scm/const_test.go
@@ -25,3 +25,24 @@ func TestStateJSON(t *testing.T) {
25
})
26
}
27
28
+
29
+func TestActionJSON(t *testing.T) {
30
+ for i := ActionCreate; i < ActionCompleted; i++ {
31
+ in := i
32
+ t.Run(in.String(), func(t *testing.T) {
33
+ b, err := json.Marshal(in)
34
+ if err != nil {
35
+ t.Fatal(err)
36
+ }
37
38
+ var out Action
39
+ if err := json.Unmarshal(b, &out); err != nil {
40
41
42
43
+ if in != out {
44
+ t.Errorf("%s != %s", in, out)
45
46
+ })
47
48
+}
0 commit comments