github.com/LukasHeimann/cloudfoundrycli@v7.1.0+incompatible/actor/v7pushaction/setup_task_app_for_push_plan_test.go (about) 1 package v7pushaction_test 2 3 import ( 4 . "code.cloudfoundry.org/cli/actor/v7pushaction" 5 6 . "github.com/onsi/ginkgo" 7 . "github.com/onsi/gomega" 8 ) 9 10 var _ = Describe("SetupTaskAppForPushPlan", func() { 11 var ( 12 pushPlan PushPlan 13 overrides FlagOverrides 14 15 expectedPushPlan PushPlan 16 executeErr error 17 ) 18 19 BeforeEach(func() { 20 pushPlan = PushPlan{} 21 overrides = FlagOverrides{} 22 }) 23 24 JustBeforeEach(func() { 25 expectedPushPlan, executeErr = SetupTaskAppForPushPlan(pushPlan, overrides) 26 }) 27 28 When("flag overrides specifies task type app", func() { 29 BeforeEach(func() { 30 overrides.Task = true 31 }) 32 33 It("sets task app type on the push plan", func() { 34 Expect(executeErr).ToNot(HaveOccurred()) 35 Expect(expectedPushPlan.TaskTypeApplication).To(BeTrue()) 36 }) 37 }) 38 })