Skip to content

Commit

Permalink
Add env test for ternary condition
Browse files Browse the repository at this point in the history
  • Loading branch information
cam-stitt committed Dec 1, 2017
1 parent d505ad1 commit 6a7286e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions interpolation/funcs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,11 @@ func TestInterpolationFuncEnv(t *testing.T) {
expectation: "",
evalError: true,
},
{
description: "Empty env ternary",
text: `${env("FOO") != "" ? env("FOO") : "bar"}`,
expectation: "bar",
},
}

envTestFunc := testInterpolationFunc("env", interpolationFuncEnv)
Expand Down

0 comments on commit 6a7286e

Please sign in to comment.