...

Source file src/github.com/leodido/go-urn/scim/schema/type_test.go

Documentation: github.com/leodido/go-urn/scim/schema

     1  package scimschema
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/stretchr/testify/require"
     7  )
     8  
     9  func TestTypeFromString(t *testing.T) {
    10  	uns := TypeFromString("wrong")
    11  	require.Equal(t, Unsupported, uns)
    12  	require.Empty(t, uns.String())
    13  
    14  	schemas := TypeFromString("schemas")
    15  	require.Equal(t, Schemas, schemas)
    16  	require.Equal(t, "schemas", schemas.String())
    17  
    18  	api := TypeFromString("api")
    19  	require.Equal(t, API, api)
    20  	require.Equal(t, "api", api.String())
    21  
    22  	param := TypeFromString("param")
    23  	require.Equal(t, Param, param)
    24  	require.Equal(t, "param", param.String())
    25  }
    26  

View as plain text