summaryrefslogtreecommitdiffstats
path: root/test/object_helpers.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/object_helpers.rb')
-rw-r--r--test/object_helpers.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/object_helpers.rb b/test/object_helpers.rb
index 7061e75c1..74f82b68b 100644
--- a/test/object_helpers.rb
+++ b/test/object_helpers.rb
@@ -125,6 +125,7 @@ module ObjectHelpers
@generated_version_name.succ!
version = Version.new(attributes)
version.name = @generated_version_name.dup if version.name.blank?
+ version.project ||= Project.find(1)
yield version if block_given?
version.save!
version