Fixes work package factory

pull/848/head
Hagen Schink 11 years ago
parent 1fc5b8c1b9
commit 2cb44f7e83
  1. 8
      spec/factories/work_package_factory.rb

@ -44,8 +44,12 @@ FactoryGirl.define do
custom_values = evaluator.custom_values || {}
custom_values.each_pair do |custom_field_id, value|
work_package.custom_values.build custom_field_id: custom_field_id, value: value
if custom_values.is_a? Hash
custom_values.each_pair do |custom_field_id, value|
work_package.custom_values.build custom_field_id: custom_field_id, value: value
end
else
custom_values.each { |cv| work_package.custom_values << cv }
end
end
end

Loading…
Cancel
Save