...

Source file src/github.com/go-openapi/loads/loaders_test.go

Documentation: github.com/go-openapi/loads

     1  package loads
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/stretchr/testify/require"
     7  )
     8  
     9  func TestLoader_EdgeCases(t *testing.T) {
    10  	ldr := &loader{}
    11  	ldr.Fn = JSONDoc
    12  
    13  	// chaining with nil is a no op
    14  	next := ldr.WithHead(nil)
    15  	require.Equal(t, ldr, next)
    16  
    17  	_, err := ldr.Load(`d\::invalid uri\`)
    18  	require.Error(t, err)
    19  }
    20  

View as plain text