aboutsummaryrefslogtreecommitdiffstats
path: root/spec/factories.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/factories.rb')
-rw-r--r--spec/factories.rb34
1 files changed, 25 insertions, 9 deletions
diff --git a/spec/factories.rb b/spec/factories.rb
index 681400443..205f020bb 100644
--- a/spec/factories.rb
+++ b/spec/factories.rb
@@ -13,6 +13,14 @@ FactoryGirl.define do
f.time_zone "Europe/Paris"
end
+ factory :rule_parameter_set do |f|
+ f.sequence(:name) { |n| "Test #{n}" }
+ f.association :referential
+ f.after_create do |rsp|
+ rsp.parameters = RuleParameterSet.default_for_all_modes( rsp.referential).parameters
+ end
+ end
+
factory :user do |f|
f.association :organisation
f.sequence(:name) { |n| "chouette#{n}" }
@@ -21,16 +29,15 @@ FactoryGirl.define do
f.password_confirmation "secret"
end
- factory :import do |f|
+ factory :import_task do |f|
+ f.user_name "dummy"
+ f.user_id 123
+ f.no_save false
+ f.format "Neptune"
f.resources { Rack::Test::UploadedFile.new 'spec/fixtures/neptune.zip', 'application/zip', false }
f.referential { Referential.find_by_slug("first") }
end
- factory :import_log_message do |f|
- f.association :import
- f.sequence(:key) { "key_#{n}" }
- end
-
factory :kml_export do |f|
f.referential { Referential.find_by_slug("first") }
end
@@ -49,9 +56,18 @@ FactoryGirl.define do
f.duration 1
end
- factory :file_validation do |f|
- f.resources { Rack::Test::UploadedFile.new 'spec/fixtures/neptune.zip', 'application/zip', false }
- f.association :organisation
+ factory :compliance_check_result do |f|
+ f.association :compliance_check_task
+ f.rule_code "2-NEPTUNE-StopArea-6"
+ f.severity "warning"
+ f.status "nok"
+ end
+
+ factory :compliance_check_task do |f|
+ f.user_id 1
+ f.user_name "Dummy"
+ f.status "pending"
+ f.referential { Referential.find_by_slug("first") }
end
factory :file_validation_log_message do |f|