Test missing sprint information

pull/6827/head
Mark Maglana 14 years ago
parent ce3756078f
commit 0ac57c1068
  1. 7
      features/scrum_master.feature
  2. 2
      features/step_definitions/_given_steps.rb
  3. 4
      features/step_definitions/_then_steps.rb

@ -29,3 +29,10 @@ Feature: Scrum Master
Then the sprint should be updated accordingly
And the request should complete successfully
Scenario: Update sprint with no name
Given I am viewing the master backlog
And I want to edit the sprint named sprint 001
And I want to set the name of the sprint to an empty string
When I update the sprint
Then the server should return an update error

@ -53,6 +53,7 @@ Given /^I set the (.+) of the story to (.+)$/ do |attribute, value|
end
Given /^I set the (.+) of the task to (.+)$/ do |attribute, value|
value = '' if value == 'an empty string'
@task_params[attribute] = value
end
@ -72,6 +73,7 @@ Given /^I want to edit the sprint named (.+)$/ do |name|
end
Given /^I want to set the (.+) of the sprint to (.+)$/ do |attribute, value|
value = '' if value == "an empty string"
@sprint_params[attribute] = value
end

@ -52,6 +52,10 @@ Then /^the (\d+)(?:st|nd|rd|th) task for (.+) should be (.+)$/ do |position, sto
story.children[position.to_i - 1].subject.should == task_subject
end
Then /^the server should return an update error$/ do
page.driver.response.status.should == 400
end
Then /^the sprint should be updated accordingly$/ do
sprint = Sprint.find(@sprint_params['id'])

Loading…
Cancel
Save