Skip to content

Commit b6ba7fa

Browse files
committed
Add assertions for state output in stack command tests
1 parent e44f012 commit b6ba7fa

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

command/v7/stack_command_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,10 @@ var _ = Describe("Stack Command", func() {
141141
Expect(executeErr).ToNot(HaveOccurred())
142142
Expect(fakeActor.GetStackByNameArgsForCall(0)).To(Equal("some-stack-name"))
143143
Expect(fakeActor.GetStackByNameCallCount()).To(Equal(1))
144+
145+
Expect(testUI.Out).To(Say("name:\\s+some-stack-name"))
146+
Expect(testUI.Out).To(Say("description:\\s+some-stack-desc"))
147+
Expect(testUI.Out).NotTo(Say("state:"))
144148
})
145149
})
146150

@@ -159,6 +163,10 @@ var _ = Describe("Stack Command", func() {
159163
Expect(executeErr).ToNot(HaveOccurred())
160164
Expect(fakeActor.GetStackByNameArgsForCall(0)).To(Equal("some-stack-name"))
161165
Expect(fakeActor.GetStackByNameCallCount()).To(Equal(1))
166+
167+
Expect(testUI.Out).To(Say("name:\\s+some-stack-name"))
168+
Expect(testUI.Out).To(Say("description:\\s+some-stack-desc"))
169+
Expect(testUI.Out).To(Say("state:\\s+ACTIVE"))
162170
})
163171
})
164172

0 commit comments

Comments
 (0)