github.com/sleungcy-sap/cli@v7.1.0+incompatible/actor/v7pushaction/setup_no_start_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("SetupNoStartForPushPlan", 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 = SetupNoStartForPushPlan(pushPlan, overrides)
    26  	})
    27  
    28  	When("flag overrides specifies no start", func() {
    29  		BeforeEach(func() {
    30  			overrides.NoStart = true
    31  		})
    32  
    33  		It("sets no start on the push plan", func() {
    34  			Expect(executeErr).ToNot(HaveOccurred())
    35  			Expect(expectedPushPlan.NoStart).To(BeTrue())
    36  		})
    37  	})
    38  })