Context("when logged in", func() { BeforeEach(func() { requirementsFactory.NewLoginRequirementReturns(requirements.Passing{}) }) It("lists buildpacks", func() { p1 := 5 p2 := 10 p3 := 15 t := true f := false buildpackRepo.Buildpacks = []models.Buildpack{ {Name: "Buildpack-1", Position: &p1, Enabled: &t, Locked: &f}, {Name: "Buildpack-2", Position: &p2, Enabled: &f, Locked: &t}, {Name: "Buildpack-3", Position: &p3, Enabled: &t, Locked: &f}, } runCommand() Expect(ui.Outputs()).To(ContainSubstrings( []string{"Getting buildpacks"}, []string{"buildpack", "position", "enabled"}, []string{"Buildpack-1", "5", "true", "false"}, []string{"Buildpack-2", "10", "false", "true"}, []string{"Buildpack-3", "15", "true", "false"}, )) }) It("tells the user if no build packs exist", func() {