Update acceptance test fixture to include broadcast latest id stubbed endpoint.

This commit is contained in:
Marco Vermeulen
2015-03-07 06:15:35 +00:00
parent 092fa3b9c2
commit 365e97e972
3 changed files with 7 additions and 6 deletions

View File

@@ -6,19 +6,19 @@ Feature: Broadcast
Scenario: A command is issued with no prior Broadcast received
Given no prior Broadcast was received
And a new Broadcast "This is a LIVE Broadcast!" is available
And a new Broadcast "This is a LIVE Broadcast!" with id "12345" is available
When I enter "gvm version"
Then I see "This is a LIVE Broadcast!"
Scenario: A command is issued where the prior Broadcast was different to the Live one
Given a prior Broadcast "This is an OLD Broadcast!" was issued
And a new Broadcast "This is a LIVE Broadcast!" is available
And a new Broadcast "This is a LIVE Broadcast!" with id "12345" is available
When I enter "gvm version"
Then I see "This is a LIVE Broadcast!"
Scenario: A command is issued where the prior Broadcast was the same as the Live one
Given a prior Broadcast "This is a LIVE Broadcast!" was issued
And a new Broadcast "This is a LIVE Broadcast!" is available
And a new Broadcast "This is a LIVE Broadcast!" with id "12345" is available
When I enter "gvm version"
Then I do not see "This is a LIVE Broadcast!"
@@ -29,7 +29,7 @@ Feature: Broadcast
Scenario: A Broadcast command is issued with no prior Broadcast received
Given no prior Broadcast was received
And a new Broadcast "This is a LIVE Broadcast!" is available
And a new Broadcast "This is a LIVE Broadcast!" with id "12345" is available
When I enter "gvm broadcast"
Then I see "This is a LIVE Broadcast!"

View File

@@ -86,7 +86,7 @@ Feature: Mnemonics
Scenario: Shortcut for a Broadcast command issued
Given no prior Broadcast was received
And a new Broadcast "This is a LIVE Broadcast!" is available
And a new Broadcast "This is a LIVE Broadcast!" with id "12345" is available
When I enter "gvm b"
Then I see "This is a LIVE Broadcast!"

View File

@@ -7,7 +7,8 @@ And(~'^no prior Broadcast was received$') { ->
broadcastFile.delete()
}
And(~'^a new Broadcast "([^"]*)" is available$') { String broadcast ->
And(~'^a new Broadcast "(.*)" with id "(.*)" is available$') { String broadcast, String id ->
primeEndpoint("/broadcast/latest/id", id)
primeEndpoint("/broadcast/latest", broadcast)
}