(t *testing.T)
| 53 | } |
| 54 | |
| 55 | func TestEval_StringInterpolation(t *testing.T) { |
| 56 | resolve := mockResolver{ |
| 57 | "node1:out-0": FloatVal(23.5), |
| 58 | } |
| 59 | |
| 60 | v, err := Eval(workflowapi.Expression{ |
| 61 | Expression: "Temperature is ${} degrees", |
| 62 | DataType: workflowapi.String, |
| 63 | References: []workflowapi.Reference{{SrcId: "node1", VarId: "out-0"}}, |
| 64 | }, resolve) |
| 65 | require.NoError(t, err) |
| 66 | assert.Equal(t, "Temperature is 23.5 degrees", v.AsString()) |