File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -58,4 +58,22 @@ func TestMountGroupCodec(t *testing.T) {
58
58
})
59
59
})
60
60
})
61
+
62
+ Convey ("Given serial MountGroup fixtures" , t , func () {
63
+ Convey ("Decoding present but blank mounts into full formula should work" , func () {
64
+ fixture := `{"action":{"escapes":{"mounts":{}}}}`
65
+ var reheat * def.Formula
66
+ decodeFromJson ([]byte (fixture ), & reheat )
67
+ So (len (reheat .Action .Escapes .Mounts ), ShouldEqual , 0 )
68
+ })
69
+ Convey ("Decoding mounts into full formula should work" , func () {
70
+ fixture := `{"action":{"escapes":{"mounts":{"target":"source"}}}}`
71
+ var reheat * def.Formula
72
+ decodeFromJson ([]byte (fixture ), & reheat )
73
+ mounts := reheat .Action .Escapes .Mounts
74
+ So (mounts , ShouldHaveLength , 1 )
75
+ So (mounts [0 ].TargetPath , ShouldEqual , "target" )
76
+ So (mounts [0 ].SourcePath , ShouldEqual , "source" )
77
+ })
78
+ })
61
79
}
You can’t perform that action at this time.
0 commit comments