Skip to content

Commit 1fa5140

Browse files
committed
fix(releases_test.go): use shorter matcher names
1 parent 7c3fbe6 commit 1fa5140

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

_tests/releases_test.go

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package _tests_test
22

33
import (
4-
"fmt"
54
. "github.com/onsi/ginkgo"
65
. "github.com/onsi/gomega"
76
)
@@ -11,20 +10,20 @@ var _ = Describe("Releases", func() {
1110
Context("with no app", func() {
1211
It("can create an app", func() {
1312
output, err := execute("deis apps:create %s --no-remote", appName)
14-
Expect(err).NotTo(HaveOccurred())
15-
Expect(output).To(ContainSubstring(fmt.Sprintf("Creating Application... done, created %s", appName)))
13+
Expect(err).To(BeNil())
14+
Expect(output).Should(HavePrefix("Creating Application... done, created %s", appName))
1615
})
1716
It("can deploy the app", func() {
1817
output, err := execute("deis pull deis/example-go -a %s", appName)
19-
Expect(err).NotTo(HaveOccurred())
20-
Expect(output).To(ContainSubstring("Creating build... done"))
18+
Expect(err).To(BeNil())
19+
Expect(output).To(ContainSubstring(HavePrefix("Creating build... done")))
2120
})
2221
})
2322

2423
Context("with a deployed app", func() {
2524
It("can list releases", func() {
2625
output, err := execute("deis releases:list -a %s", appName)
27-
Expect(err).NotTo(HaveOccurred())
26+
Expect(err).To(BeNil())
2827
Expect(output).To(SatisfyAll(
2928
HavePrefix("=== %s Releases", appName),
3029
MatchRegexp(`v1\t.*\t%s created initial release`, testUser),
@@ -34,7 +33,7 @@ var _ = Describe("Releases", func() {
3433

3534
It("can rollback to a previous release", func() {
3635
output, err := execute("deis releases:rollback v1 -a %s", appName)
37-
Expect(err).NotTo(HaveOccurred())
36+
Expect(err).To(BeNil())
3837
Expect(output).To(SatisfyAll(
3938
HavePrefix("Rolling back to"),
4039
ContainSubstring("...done"),
@@ -43,7 +42,7 @@ var _ = Describe("Releases", func() {
4342

4443
It("can get info on releases", func() {
4544
output, err := execute("deis releases:info v1 -a %s", appName)
46-
Expect(err).NotTo(HaveOccurred())
45+
Expect(err).To(BeNil())
4746
Expect(output).To(SatisfyAll(
4847
HavePrefix("=== %s Release v1", appName),
4948
MatchRegexp(`config:\s+[\w-]+`),

0 commit comments

Comments
 (0)