// TestUnmarshalOIDCPromptValue makes sure that prompt value is set properly
TestUnmarshalOIDCPromptValue makes sure that prompt value is set properly
// TestUnmarshalOIDCPromptValue makes sure that prompt value is set properly
func TestOIDCUnmarshalPromptValue(t *testing.T) {
	input := `
      {
        "kind": "oidc",
        "version": "v2",
        "metadata": {
          "name": "google"
        },
        "spec": {
          "issuer_url": "https://accounts.google.com",
          "client_id": "id-from-google.apps.googleusercontent.com",
          "client_secret": "secret-key-from-google",
          "redirect_url": "https://localhost:3080/v1/webapi/oidc/callback",
          "display": "whatever",
          "scope": ["roles"],
          "prompt": "consent login"
        }
      }
	`
	oc, err := GetOIDCConnectorMarshaler().UnmarshalOIDCConnector([]byte(input))
	require.NoError(t, err)
	require.Equal(t, "google", oc.GetName())
	require.Equal(t, "https://accounts.google.com", oc.GetIssuerURL())
	require.Equal(t, "id-from-google.apps.googleusercontent.com", oc.GetClientID())
	require.Equal(t, "https://localhost:3080/v1/webapi/oidc/callback", oc.GetRedirectURL())
	require.Equal(t, "whatever", oc.GetDisplay())
	require.Equal(t, "consent login", oc.GetPrompt())
}
func TestOIDCUnmarshalPromptValue ( t * testing . T ) { input := `
      {
        "kind": "oidc",
        "version": "v2",
        "metadata": {
          "name": "google"
        },
        "spec": {
          "issuer_url": "https://accounts.google.com",
          "client_id": "id-from-google.apps.googleusercontent.com",
          "client_secret": "secret-key-from-google",
          "redirect_url": "https://localhost:3080/v1/webapi/oidc/callback",
          "display": "whatever",
          "scope": ["roles"],
          "prompt": "consent login"
        }
      }
	` oc , err := GetOIDCConnectorMarshaler ( ) . UnmarshalOIDCConnector ( [ ] byte ( input ) ) require . NoError ( t , err ) require . Equal ( t , " " , oc . GetName ( ) ) require . Equal ( t , " " , oc . GetIssuerURL ( ) ) require . Equal ( t , " " , oc . GetClientID ( ) ) require . Equal ( t , " " , oc . GetRedirectURL ( ) ) require . Equal ( t , " " , oc . GetDisplay ( ) ) require . Equal ( t , " " , oc . GetPrompt ( ) ) }
TestUnmarshalOIDCPromptValue makes sure that prompt value is set properly
TestUnmarshalOIDCPromptValue makes sure that prompt value is set properly