forked from vmware-archive/atc
/
plan_test.go
47 lines (42 loc) · 975 Bytes
/
plan_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
package atc_test
import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/concourse/atc"
)
var _ = Describe("Plan", func() {
Describe("PutPlan", func() {
It("can convert itself to a GetPlan", func() {
putPlan := atc.PutPlan{
Type: "resource-type",
Name: "resource-name",
Resource: "resource-resource",
Pipeline: "resource-pipeline",
Source: atc.Source{
"resource": "source",
},
Params: atc.Params{
"resource": "params",
},
GetParams: atc.Params{
"resource": "get-params",
},
Tags: []string{"tags"},
}
getPlan := atc.GetPlan{
Type: "resource-type",
Name: "resource-name",
Resource: "resource-resource",
Pipeline: "resource-pipeline",
Source: atc.Source{
"resource": "source",
},
Params: atc.Params{
"resource": "get-params",
},
Tags: []string{"tags"},
}
Ω(putPlan.GetPlan()).Should(Equal(getPlan))
})
})
})