From 63cb2d5a407b60114aacfd5ed45b4e801ae51f6a Mon Sep 17 00:00:00 2001 From: Vladimir Yarotsky Date: Tue, 18 Feb 2020 11:47:30 -0800 Subject: [PATCH] AutoMerge was not unmarshalled properly --- resources.go | 3 +-- resources_test.go | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/resources.go b/resources.go index cc1ddd3..5f8b1d3 100644 --- a/resources.go +++ b/resources.go @@ -57,7 +57,7 @@ type OutParams struct { Task *string State *string Description *string - AutoMerge *bool + AutoMerge *bool `json:"auto_merge"` Payload *map[string]interface{} PayloadPath *string `json:"payload_path"` @@ -67,7 +67,6 @@ type OutParams struct { RawTask json.RawMessage `json:"task"` RawEnvironment json.RawMessage `json:"environment"` RawDescription json.RawMessage `json:"description"` - RawAutoMerge json.RawMessage `json:"auto_merge"` RawPayload json.RawMessage `json:"payload"` } diff --git a/resources_test.go b/resources_test.go index 95d601b..4d89125 100644 --- a/resources_test.go +++ b/resources_test.go @@ -61,7 +61,8 @@ var _ = Describe("Resources", func() { "state": "state-string", "task": "task-string", "environment": "environment-string", - "description": "description-string" + "description": "description-string", + "auto_merge": false } }`)) err := json.NewDecoder(r).Decode(&p) @@ -73,6 +74,7 @@ var _ = Describe("Resources", func() { Ω(*p.Params.Task).Should(Equal("task-string")) Ω(*p.Params.Environment).Should(Equal("environment-string")) Ω(*p.Params.Description).Should(Equal("description-string")) + Ω(*p.Params.AutoMerge).Should(Equal(false)) }) It("gets values from files", func() {