From cb5f92b009953552d06ae20c486629ef5496b419 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=A4fer?= Date: Fri, 16 Aug 2024 21:01:59 +0200 Subject: [PATCH] fix: db:seeds:fill only for one organization (#1968) Motivation ---------- I used these seeds to review #1964. What I observed is that the list of requests is visible across all organizations but the search is scoped. I.e. if you search, you have no search results. That's why I updated the seeds here, to check if the error persists for only one organization. Answer: no How to test ----------- 1. `git switch main` or `git switch update_seeds_fill` 1. `bin/rails db:seeds:fill` 2. Do a full text search 3. On `main` you won't see anything but on this branch you will --- db/seeds/fill.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/db/seeds/fill.rb b/db/seeds/fill.rb index 1033581f7..5a60a78f7 100644 --- a/db/seeds/fill.rb +++ b/db/seeds/fill.rb @@ -15,6 +15,7 @@ FactoryBot.modify do factory :contributor do + organization { Organization.singleton } data_processing_consent { true } first_name { Faker::Name.first_name } last_name { Faker::Name.last_name } @@ -35,6 +36,7 @@ FactoryBot.modify do factory :request do + organization { Organization.singleton } title { Faker::Lorem.question } text { Faker::Lorem.paragraph } user { users.sample }