From a6a8a37ae18b2aeb74c622e19ec1721746ae1cde Mon Sep 17 00:00:00 2001 From: "Pia B." Date: Mon, 11 May 2026 17:17:00 +0200 Subject: [PATCH] add raketasks to generate collections for testing (#38986) --- lib/tasks/dev.rake | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/lib/tasks/dev.rake b/lib/tasks/dev.rake index b1a144f64cd..5aefb1fd00e 100644 --- a/lib/tasks/dev.rake +++ b/lib/tasks/dev.rake @@ -441,8 +441,39 @@ namespace :dev do text: 'This post has a manual quote policy', account: remote_account, visibility: :public, - quote_approval_policy: Status::QUOTE_APPROVAL_POLICY_FLAGS[:public] + quote_approval_policy: InteractionPolicy::POLICY_FLAGS[:public] ).find_or_create_by!(id: 10_000_030) + + showcase_collection = Collection.create_with( + account: showcase_account, + name: 'Showcase Collection', + description: 'super cool description', + local: true, + sensitive: false, + discoverable: true + ).find_or_create_by!(id: 10_000_031) + + another_collection = Collection.create_with( + account: showcase_account, + name: 'Another Collection', + description: 'super cool description', + local: true, + sensitive: false, + discoverable: true + ).find_or_create_by!(id: 10_000_032) + + report = Report.create_with( + action_taken_at: nil + ).find_or_create_by!(account: showcase_sidekick_account, target_account: showcase_account, comment: 'not very nice') + + CollectionReport.find_or_create_by!(collection: showcase_collection, report: report) + + CollectionReport.find_or_create_by!(collection: another_collection, report: report) + + Report.create_with( + status_ids: [10_000_028, 10_000_027], + action_taken_at: nil + ).find_or_create_by!(account: showcase_sidekick_account, target_account: showcase_account, comment: 'very unique comment') end end end