github.com/jcmturner/gokrb5/v8@v8.4.4/client/client_test.go (about)

     1  package client
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/jcmturner/gokrb5/v8/config"
     7  	"github.com/jcmturner/gokrb5/v8/keytab"
     8  )
     9  
    10  func TestAssumePreauthentication(t *testing.T) {
    11  	t.Parallel()
    12  
    13  	cl := NewWithKeytab("username", "REALM", &keytab.Keytab{}, &config.Config{}, AssumePreAuthentication(true))
    14  	if !cl.settings.assumePreAuthentication {
    15  		t.Fatal("assumePreAuthentication should be true")
    16  	}
    17  	if !cl.settings.AssumePreAuthentication() {
    18  		t.Fatal("AssumePreAuthentication() should be true")
    19  	}
    20  }