OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openproject/features/step_definitions/query_steps.rb

16 lines
603 B

Given /^the [Pp]roject "([^\"]*)" has (\d+) [wW]ork [pP]ackage [qQ]uer(?:ies|y)? with(?: the following)?:$/ do |project, count, table|
p = Project.find_by_name(project) || Project.find_by_identifier(project)
as_admin count do
i = FactoryGirl.build(:query, :project => p)
send_table_to_object(i, table)
i.save
end
end
Given /^the [Pp]roject "([^\"]*)" has (\d+) [wW]ork [pP]ackage [qQ]uer(?:ies|y)?$/ do |project, count|
p = Project.find_by_name(project) || Project.find_by_identifier(project)
as_admin count do
i = FactoryGirl.build(:query, :project => p)
i.save
end
end