forked from cloudfoundry/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathduplicate_service_plan_error_test.go
More file actions
41 lines (39 loc) · 1.55 KB
/
Copy pathduplicate_service_plan_error_test.go
File metadata and controls
41 lines (39 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package actionerror_test
import (
"code.cloudfoundry.org/cli/v8/actor/actionerror"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
var _ = Describe("DuplicateServicePlanError", func() {
Describe("Error", func() {
When("Only Name is specified", func() {
It("returns the right error message", func() {
err := actionerror.DuplicateServicePlanError{
Name: "some-service-plan-name",
}
Expect(err.Error()).To(
Equal("Service plan 'some-service-plan-name' is provided by multiple service offerings. Specify an offering by using the '-e' flag."))
})
})
When("Name and ServiceOfferingName are specified", func() {
It("returns the right error message", func() {
err := actionerror.DuplicateServicePlanError{
Name: "some-service-plan-name",
ServiceOfferingName: "some-service-offering-name",
}
Expect(err.Error()).To(
Equal("Service plan 'some-service-plan-name' is provided by multiple service offerings. Service offering 'some-service-offering-name' is provided by multiple service brokers. Specify a broker name by using the '-b' flag."))
})
})
When("Name and ServiceBrokerName are specified", func() {
It("returns the right error message", func() {
err := actionerror.DuplicateServicePlanError{
Name: "some-service-plan-name",
ServiceBrokerName: "some-broker-name",
}
Expect(err.Error()).To(
Equal("Service plan 'some-service-plan-name' is provided by multiple service offerings. Specify an offering by using the '-e' flag."))
})
})
})
})