github.com/hellofresh/janus@v0.0.0-20230925145208-ce8de8183c67/pkg/plugin/oauth2/setup_test.go (about)

     1  package oauth2
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/hellofresh/janus/pkg/plugin"
     7  	"github.com/stretchr/testify/assert"
     8  	"github.com/stretchr/testify/require"
     9  )
    10  
    11  func TestOAuth2Config(t *testing.T) {
    12  	var config Config
    13  	rawConfig := map[string]interface{}{
    14  		"server_name": "test",
    15  	}
    16  
    17  	err := plugin.Decode(rawConfig, &config)
    18  	require.NoError(t, err)
    19  	assert.Equal(t, "test", config.ServerName)
    20  }