Added check to not add already existing trackers in case some previous setup

step already added the same tracker
pull/179/head
Sebastian Schuster 12 years ago
parent 7b819d4045
commit 95fdd40782
  1. 4
      features/step_definitions/general_steps.rb

@ -384,7 +384,7 @@ Given /^I (?:stop|pause) (?:step )?execution$/ do
end
end
When /^(?:|I )login as (.+)?(?: with password )?(.+)?$/ do |username, password|
When /^(?:|I )login as (.+)(?: with password (.+))?$/ do |username, password|
username = username.gsub("\"", "")
password = password.nil? ? "admin" : password.gsub("\"", "")
login(username, password)
@ -426,9 +426,11 @@ Given /^the [pP]roject(?: "([^\"]*)")? has the following trackers:$/ do |project
tracker.position = t['position'] ? t['position'] : i
tracker.is_in_roadmap = t['is_in_roadmap'] ? t['is_in_roadmap'] : true
tracker.save!
if !p.trackers.include?(tracker)
p.trackers << tracker
p.save!
end
end
end
def get_project(project_name = nil)

Loading…
Cancel
Save