From 365e97e972d0eada511dec4751a809fc527e9d7f Mon Sep 17 00:00:00 2001 From: Marco Vermeulen Date: Sat, 7 Mar 2015 06:15:35 +0000 Subject: [PATCH] Update acceptance test fixture to include broadcast latest id stubbed endpoint. --- src/test/cucumber/gvm/broadcast.feature | 8 ++++---- src/test/cucumber/gvm/mnemonics.feature | 2 +- src/test/steps/gvm/broadcast_steps.groovy | 3 ++- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/test/cucumber/gvm/broadcast.feature b/src/test/cucumber/gvm/broadcast.feature index f63fe900..4959a09a 100644 --- a/src/test/cucumber/gvm/broadcast.feature +++ b/src/test/cucumber/gvm/broadcast.feature @@ -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!" diff --git a/src/test/cucumber/gvm/mnemonics.feature b/src/test/cucumber/gvm/mnemonics.feature index 94c89fba..34609de6 100644 --- a/src/test/cucumber/gvm/mnemonics.feature +++ b/src/test/cucumber/gvm/mnemonics.feature @@ -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!" diff --git a/src/test/steps/gvm/broadcast_steps.groovy b/src/test/steps/gvm/broadcast_steps.groovy index 6ceae693..73d8bd88 100644 --- a/src/test/steps/gvm/broadcast_steps.groovy +++ b/src/test/steps/gvm/broadcast_steps.groovy @@ -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) }