github.com/loggregator/cli@v6.33.1-0.20180224010324-82334f081791+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 })