mirror of
https://github.com/anchore/syft.git
synced 2026-08-19 16:48:27 +02:00
20 lines
444 B
Go
20 lines
444 B
Go
package options
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestFormatSPDXJSON_buildConfig(t *testing.T) {
|
|
// assert when building the config that we respond to all possible fields
|
|
|
|
ft := &FormatSPDXJSON{}
|
|
ft = setAllToNonZero(t, ft).(*FormatSPDXJSON)
|
|
|
|
subject := ft.config("Version")
|
|
require.Equal(t, "Version", subject.Version)
|
|
require.Equal(t, "2.3", subject.DefaultVersion)
|
|
require.True(t, subject.Pretty)
|
|
}
|