github.com/mook-as/cf-cli@v7.0.0-beta.28.0.20200120190804-b91c115fae48+incompatible/cf/formatters/memoryLimit_test.go (about)

     1  package formatters_test
     2  
     3  import (
     4  	. "code.cloudfoundry.org/cli/cf/formatters"
     5  	. "github.com/onsi/ginkgo"
     6  	. "github.com/onsi/gomega"
     7  )
     8  
     9  var _ = Describe("memoryLimit formatting", func() {
    10  	It("returns 'unlimited' when limit is -1", func() {
    11  		Expect(InstanceMemoryLimit(-1)).To(Equal("unlimited"))
    12  	})
    13  
    14  	It("formats original value to <val>M when limit is not -1", func() {
    15  		Expect(InstanceMemoryLimit(100)).To(Equal("100M"))
    16  	})
    17  })