package rainmaker_test

import (
	"github.com/pivotal-cf-experimental/rainmaker"

	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
)

var _ = Describe("OrganizationsService", func() {
	var (
		config       rainmaker.Config
		token        string
		service      rainmaker.OrganizationsService
		organization rainmaker.Organization
	)

	BeforeEach(func() {
		var err error

		token = "token"
		config = rainmaker.Config{
			Host: fakeCloudController.URL(),
		}
		client := rainmaker.NewClient(config)
		service = client.Organizations

		organization, err = service.Create("test-org", token)
		Expect(err).NotTo(HaveOccurred())
	})
package rainmaker_test

import (
	"github.com/pivotal-cf-experimental/rainmaker"

	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
)

var _ = Describe("OrganizationsService", func() {
	var config rainmaker.Config
	var token string
	var service *rainmaker.OrganizationsService
	var organization rainmaker.Organization

	BeforeEach(func() {
		var err error

		token = "token"
		config = rainmaker.Config{
			Host: fakeCloudController.URL(),
		}
		client := rainmaker.NewClient(config)
		service = client.Organizations

		organization, err = service.Create("test-org", token)
		if err != nil {
			panic(err)
		}
	})