zitadel-oidc/pkg/oidc/regression_create_test.go
Tim Möhlmann 11682a2cc8 oidc: add regression tests for token claim json
this helps to verify that the same JSON is produced,
after these types are refactored.
2023-03-02 16:45:15 +02:00

24 lines
528 B
Go

//go:build create_regression_data
package oidc
import (
"os"
"testing"
"github.com/stretchr/testify/require"
)
// Test_create_regression generates the regression data.
// It is excluded from regular testing, unless
// called with the create_regression_data tag:
// go test -tags="create_regression_data" ./pkg/oidc
func Test_create_regression(t *testing.T) {
for _, obj := range regressionData {
file, err := os.Create(jsonFilename(obj))
require.NoError(t, err)
defer file.Close()
encodeJSON(t, file, obj)
}
}