github.com/LukasHeimann/cloudfoundrycli/v8@v8.4.4/command/v7/revision_command_test.go (about) 1 package v7_test 2 3 import ( 4 "github.com/LukasHeimann/cloudfoundrycli/v8/command/commandfakes" 5 v7 "github.com/LukasHeimann/cloudfoundrycli/v8/command/v7" 6 "github.com/LukasHeimann/cloudfoundrycli/v8/command/v7/v7fakes" 7 "github.com/LukasHeimann/cloudfoundrycli/v8/util/ui" 8 . "github.com/onsi/ginkgo" 9 . "github.com/onsi/gomega" 10 . "github.com/onsi/gomega/gbytes" 11 ) 12 13 var _ = Describe("revision Command", func() { 14 var ( 15 cmd v7.RevisionCommand 16 testUI *ui.UI 17 fakeConfig *commandfakes.FakeConfig 18 fakeSharedActor *commandfakes.FakeSharedActor 19 fakeActor *v7fakes.FakeActor 20 binaryName string 21 appName string 22 23 out *Buffer 24 ) 25 26 BeforeEach(func() { 27 out = NewBuffer() 28 testUI = ui.NewTestUI(nil, out, NewBuffer()) 29 fakeConfig = new(commandfakes.FakeConfig) 30 fakeSharedActor = new(commandfakes.FakeSharedActor) 31 fakeActor = new(v7fakes.FakeActor) 32 33 cmd = v7.RevisionCommand{ 34 BaseCommand: v7.BaseCommand{ 35 UI: testUI, 36 Config: fakeConfig, 37 SharedActor: fakeSharedActor, 38 Actor: fakeActor, 39 }, 40 } 41 binaryName = "faceman" 42 fakeConfig.BinaryNameReturns(binaryName) 43 appName = "some-app" 44 45 cmd.RequiredArgs.AppName = appName 46 }) 47 48 JustBeforeEach(func() { 49 cmd.Execute(nil) 50 }) 51 52 It("displays the experimental warning", func() { 53 Expect(testUI.Err).To(Say("This command is in EXPERIMENTAL stage and may change without notice")) 54 }) 55 })