github.com/animeshon/gqlgen@v0.13.1-0.20210304133704-3a770431bb6d/graphql/handler/extension/introspection_test.go (about)

     1  package extension
     2  
     3  import (
     4  	"context"
     5  	"testing"
     6  
     7  	"github.com/animeshon/gqlgen/graphql"
     8  	"github.com/stretchr/testify/require"
     9  )
    10  
    11  func TestIntrospection(t *testing.T) {
    12  	rc := &graphql.OperationContext{
    13  		DisableIntrospection: true,
    14  	}
    15  	require.Nil(t, Introspection{}.MutateOperationContext(context.Background(), rc))
    16  	require.Equal(t, false, rc.DisableIntrospection)
    17  }