From 10a33c4fe3245fbb57ac6b89bb22196d8f152551 Mon Sep 17 00:00:00 2001 From: Hagen Schink Date: Fri, 3 Jan 2014 15:00:54 +0100 Subject: [PATCH] Prevents unecessary status validations --- features/step_definitions/issue_steps.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/features/step_definitions/issue_steps.rb b/features/step_definitions/issue_steps.rb index 0aa179de90..6e3e48ba3b 100644 --- a/features/step_definitions/issue_steps.rb +++ b/features/step_definitions/issue_steps.rb @@ -57,10 +57,14 @@ Given /^the [Uu]ser "([^\"]*)" has (\d+) [iI]ssue(?:s)? with(?: the following)?: u = User.find_by_login user raise "This user must be member of a project to have issues" unless u.projects.last as_admin count do - i = FactoryGirl.create(:work_package, project: u.projects.last) - i.author = u - i.assigned_to = u + i = FactoryGirl.create(:work_package, + project: u.projects.last, + author: u, + assigned_to: u, + status: Status.default || FactoryGirl.create(:status)) + i.type = Type.find_by_name(table.rows_hash.delete("type")) if table.rows_hash["type"] + send_table_to_object(i, table, {}, method(:add_custom_value_to_issue)) i.save! end