summaryrefslogtreecommitdiff
path: root/spec/factories/packages.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/factories/packages.rb')
-rw-r--r--spec/factories/packages.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/factories/packages.rb b/spec/factories/packages.rb
index 882bac1daa9..9edee735af9 100644
--- a/spec/factories/packages.rb
+++ b/spec/factories/packages.rb
@@ -16,6 +16,10 @@ FactoryBot.define do
status { :processing }
end
+ trait :error do
+ status { :error }
+ end
+
factory :maven_package do
maven_metadatum
@@ -36,8 +40,8 @@ FactoryBot.define do
package_type { :rubygems }
after :create do |package|
- create :package_file, :gem, package: package
- create :package_file, :gemspec, package: package
+ create :package_file, package.processing? ? :unprocessed_gem : :gem, package: package
+ create :package_file, :gemspec, package: package unless package.processing?
end
trait(:with_metadatum) do