예제 #1
0
파일: org_test.go 프로젝트: Reejoshi/cli
	testterm "github.com/cloudfoundry/cli/testhelpers/terminal"

	"github.com/cloudfoundry/cli/cf/api"
	"github.com/cloudfoundry/cli/cf/commands/organization"
	"github.com/cloudfoundry/cli/cf/requirements/requirementsfakes"
	. "github.com/cloudfoundry/cli/testhelpers/matchers"
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
)

var _ = Describe("org command", func() {
	var (
		ui             *testterm.FakeUI
		getOrgModel    *plugin_models.GetOrg_Model
		deps           commandregistry.Dependency
		reqFactory     *requirementsfakes.FakeFactory
		loginReq       *requirementsfakes.FakeRequirement
		orgRequirement *requirementsfakes.FakeOrganizationRequirement
		cmd            organization.ShowOrg
		flagContext    flags.FlagContext
	)

	BeforeEach(func() {
		ui = new(testterm.FakeUI)
		getOrgModel = new(plugin_models.GetOrg_Model)

		deps = commandregistry.Dependency{
			UI:          ui,
			Config:      testconfig.NewRepositoryWithDefaults(),
			RepoLocator: api.RepositoryLocator{},
			PluginModels: &commandregistry.PluginModels{
				Organization: getOrgModel,
예제 #2
0
파일: org_test.go 프로젝트: jasonkeene/cli
	testterm "github.com/cloudfoundry/cli/testhelpers/terminal"

	"github.com/cloudfoundry/cli/cf/api"
	"github.com/cloudfoundry/cli/cf/commands/organization"
	"github.com/cloudfoundry/cli/cf/requirements/requirementsfakes"
	. "github.com/cloudfoundry/cli/testhelpers/matchers"
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
)

var _ = Describe("org command", func() {
	var (
		ui             *testterm.FakeUI
		getOrgModel    *plugin_models.GetOrg_Model
		deps           commandregistry.Dependency
		reqFactory     *requirementsfakes.FakeFactory
		loginReq       *requirementsfakes.FakeRequirement
		orgRequirement *requirementsfakes.FakeOrganizationRequirement
		cmd            organization.ShowOrg
		flagContext    flags.FlagContext
	)

	BeforeEach(func() {
		ui = new(testterm.FakeUI)
		getOrgModel = new(plugin_models.GetOrg_Model)

		deps = commandregistry.Dependency{
			UI:          ui,
			Config:      testconfig.NewRepositoryWithDefaults(),
			RepoLocator: api.RepositoryLocator{},
			PluginModels: &commandregistry.PluginModels{
				Organization: getOrgModel,