diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-03-19 21:09:31 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-03-27 15:43:56 +0200 |
commit | baa29f6534fcd324dbade7dd6c32c90547e3fa4f (patch) | |
tree | 71a7524c25365cfc4a7cc1bbaab9d63988525d5e /output/outputFormat_test.go | |
parent | c7c6b47ba8bb098cf9fac778f7818afba40a1e2f (diff) |
output: Rework the base template logic
Extract the logic to a testable function and add support for custom output types.
Fixes #2995
Diffstat (limited to 'output/outputFormat_test.go')
-rw-r--r-- | output/outputFormat_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/output/outputFormat_test.go b/output/outputFormat_test.go index 3eb56d8d3..21375bf56 100644 --- a/output/outputFormat_test.go +++ b/output/outputFormat_test.go @@ -34,10 +34,10 @@ func TestDefaultTypes(t *testing.T) { } func TestGetType(t *testing.T) { - tp, _ := GetType("html") + tp, _ := GetFormat("html") require.Equal(t, HTMLType, tp) - tp, _ = GetType("HTML") + tp, _ = GetFormat("HTML") require.Equal(t, HTMLType, tp) - _, found := GetType("FOO") + _, found := GetFormat("FOO") require.False(t, found) } |