From cc4ca42ff97eeda88ef80bc6d16596fe3297cde0 Mon Sep 17 00:00:00 2001 From: Filippe Spolti Date: Fri, 25 Aug 2023 12:04:42 -0300 Subject: [PATCH] Adds small check to make sure that Action.FunctionRef is unmarshalled into struct (#184) Signed-off-by: Spolti --- parser/parser_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/parser/parser_test.go b/parser/parser_test.go index b52840e..c5cf0f0 100644 --- a/parser/parser_test.go +++ b/parser/parser_test.go @@ -992,6 +992,9 @@ states: workflow = nil err = json.Unmarshal(b, &workflow) + // Make sure that the Action FunctionRef is unmarshalled correctly + assert.Equal(t, model.FromString("${ .singlemessage }"), workflow.States[5].ForEachState.Actions[0].FunctionRef.Arguments["message"]) + assert.Equal(t, "sendTextFunction", workflow.States[5].ForEachState.Actions[0].FunctionRef.RefName) assert.Nil(t, err) })