lib/decidim/initiatives/participatory_space.rb in decidim-initiatives-0.26.10 vs lib/decidim/initiatives/participatory_space.rb in decidim-initiatives-0.27.0.rc1

- old
+ new

@@ -59,11 +59,11 @@ 3.times do |n| type = Decidim::InitiativesType.create!( title: Decidim::Faker::Localized.sentence(word_count: 5), description: Decidim::Faker::Localized.sentence(word_count: 25), organization: organization, - banner_image: ActiveStorage::Blob.create_after_upload!( + banner_image: ActiveStorage::Blob.create_and_upload!( io: File.open(File.join(seeds_root, "city2.jpeg")), filename: "banner_image.jpeg", content_type: "image/jpeg", metadata: nil ) @@ -88,11 +88,11 @@ scoped_type: Decidim::InitiativesTypeScope.reorder(Arel.sql("RANDOM()")).first, state: state, signature_type: "online", signature_start_date: Date.current - 7.days, signature_end_date: Date.current + 7.days, - published_at: Time.current - 7.days, + published_at: 7.days.ago, author: Decidim::User.reorder(Arel.sql("RANDOM()")).first, organization: organization } initiative = Decidim.traceability.perform_action!( @@ -110,10 +110,10 @@ Decidim::Attachment.create!( title: Decidim::Faker::Localized.sentence(word_count: 2), description: Decidim::Faker::Localized.sentence(word_count: 5), attached_to: initiative, content_type: "image/jpeg", - file: ActiveStorage::Blob.create_after_upload!( + file: ActiveStorage::Blob.create_and_upload!( io: File.open(File.join(seeds_root, "city.jpeg")), filename: "city.jpeg", content_type: "image/jpeg", metadata: nil )