github.com/arunkumar7540/cli@v6.45.0+incompatible/actor/v7pushaction/actor_test.go (about)

     1  package v7pushaction_test
     2  
     3  import (
     4  	. "code.cloudfoundry.org/cli/actor/v7pushaction"
     5  	"code.cloudfoundry.org/cli/cf/util/testhelpers/matchers"
     6  	. "github.com/onsi/ginkgo"
     7  	. "github.com/onsi/gomega"
     8  )
     9  
    10  var _ = Describe("Actor", func() {
    11  	var (
    12  		actor *Actor
    13  		plan  PushPlan
    14  	)
    15  
    16  	BeforeEach(func() {
    17  		actor, _, _, _ = getTestPushActor()
    18  	})
    19  
    20  	Describe("ChangeApplicationSequence", func() {
    21  		BeforeEach(func() {
    22  			plan = PushPlan{
    23  				ApplicationNeedsUpdate:            true,
    24  				NoRouteFlag:                       true,
    25  				DockerImageCredentialsNeedsUpdate: false,
    26  			}
    27  		})
    28  
    29  		It("returns a sequence including the required functions from all three sequences", func() {
    30  			Expect(actor.ChangeApplicationSequence(plan)).To(matchers.MatchFuncsByName(
    31  				actor.UpdateApplication,
    32  				actor.CreateBitsPackageForApplication,
    33  				actor.StagePackageForApplication,
    34  				actor.SetDropletForApplication,
    35  				actor.RestartApplication,
    36  			))
    37  		})
    38  	})
    39  })