...

Source file src/github.com/go-openapi/analysis/internal/flatten/sortref/keys_test.go

Documentation: github.com/go-openapi/analysis/internal/flatten/sortref

     1  package sortref
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/stretchr/testify/assert"
     7  )
     8  
     9  func TestName_UnitGuards(t *testing.T) {
    10  	t.Parallel()
    11  
    12  	parts := KeyParts("#/nowhere/arbitrary/pointer")
    13  
    14  	res := parts.DefinitionName()
    15  	assert.Equal(t, "", res)
    16  
    17  	res = parts.ResponseName()
    18  	assert.Equal(t, "", res)
    19  
    20  	b := parts.isKeyName(-1)
    21  	assert.False(t, b)
    22  }
    23  

View as plain text