github.com/brycereitano/goa@v0.0.0-20170315073847-8ffa6c85e265/goagen/codegen/helpers_test.go (about)

     1  package codegen_test
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/goadesign/goa/goagen/codegen"
     7  
     8  	. "github.com/onsi/gomega"
     9  )
    10  
    11  func TestHelpers(t *testing.T) {
    12  	Expect(codegen.KebabCase("testAa")).To(Equal("test-aa"))
    13  	Expect(codegen.KebabCase("test-B")).To(Equal("test-b"))
    14  	Expect(codegen.KebabCase("test_cA")).To(Equal("test-ca"))
    15  	Expect(codegen.KebabCase("test_D")).To(Equal("test-d"))
    16  	Expect(codegen.KebabCase("teste")).To(Equal("teste"))
    17  	Expect(codegen.KebabCase("testABC")).To(Equal("testabc"))
    18  	Expect(codegen.KebabCase("testAbc")).To(Equal("test-abc"))
    19  }