Example #1
0
	. "github.com/cloudfoundry/cli/testhelpers/matchers"
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
)

const TIMESTAMP_FORMAT = "2006-01-02T15:04:05.00-0700"

var _ = Describe("events command", func() {
	var (
		reqFactory  *requirementsfakes.FakeFactory
		eventsRepo  *appeventsfakes.FakeAppEventsRepository
		ui          *testterm.FakeUI
		config      *coreconfigfakes.FakeRepository
		deps        commandregistry.Dependency
		flagContext flags.FlagContext

		loginRequirement         requirements.Requirement
		targetedSpaceRequirement requirements.Requirement
		applicationRequirement   *requirementsfakes.FakeApplicationRequirement

		cmd *application.Events
	)

	BeforeEach(func() {
		cmd = &application.Events{}

		ui = new(testterm.FakeUI)
		eventsRepo = new(appeventsfakes.FakeAppEventsRepository)
		config = new(coreconfigfakes.FakeRepository)

		config.OrganizationFieldsReturns(models.OrganizationFields{Name: "my-org"})
Example #2
0
	. "github.com/cloudfoundry/cli/testhelpers/matchers"
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
)

const TIMESTAMP_FORMAT = "2006-01-02T15:04:05.00-0700"

var _ = Describe("events command", func() {
	var (
		reqFactory  *requirementsfakes.FakeFactory
		eventsRepo  *appeventsfakes.FakeAppEventsRepository
		ui          *testterm.FakeUI
		config      *coreconfigfakes.FakeRepository
		deps        commandregistry.Dependency
		flagContext flags.FlagContext

		loginRequirement         requirements.Requirement
		targetedSpaceRequirement requirements.Requirement
		applicationRequirement   *requirementsfakes.FakeApplicationRequirement

		cmd *application.Events
	)

	BeforeEach(func() {
		cmd = &application.Events{}

		ui = new(testterm.FakeUI)
		eventsRepo = new(appeventsfakes.FakeAppEventsRepository)
		config = new(coreconfigfakes.FakeRepository)

		config.OrganizationFieldsReturns(models.OrganizationFields{Name: "my-org"})