From 58a3a921cd55c54cdf606ec0d8a16d4c3f1af4e4 Mon Sep 17 00:00:00 2001 From: Arthur Campbell Date: Tue, 7 Feb 2023 15:57:39 +0000 Subject: [PATCH] update seeds to add self in review env, change spec to reflect this, update config yml to allow csv exports in review --- .github/workflows/review_pipeline.yml | 2 +- db/seeds.rb | 10 ++++++++++ spec/db/seeds_spec.rb | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/review_pipeline.yml b/.github/workflows/review_pipeline.yml index 5656898bc..ac883c788 100644 --- a/.github/workflows/review_pipeline.yml +++ b/.github/workflows/review_pipeline.yml @@ -123,7 +123,7 @@ jobs: cf set-env $APP_NAME IMPORT_PAAS_INSTANCE $IMPORT_PAAS_INSTANCE cf set-env $APP_NAME EXPORT_PAAS_INSTANCE "dluhc-core-review-export-bucket" cf set-env $APP_NAME S3_CONFIG $S3_CONFIG - cf set-env $APP_NAME CSV_DOWNLOAD_PAAS_INSTANCE "dluhc-core-review-csv-bucket" + cf set-env $APP_NAME CSV_DOWNLOAD_PAAS_INSTANCE "dluhc-core-staging-csv-bucket" cf set-env $APP_NAME SENTRY_DSN $SENTRY_DSN cf set-env $APP_NAME APP_HOST "https://dluhc-core-review-${{ github.event.pull_request.number }}.london.cloudapps.digital" diff --git a/db/seeds.rb b/db/seeds.rb index e677ad50e..75a0174e6 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -177,6 +177,16 @@ unless Rails.env.test? user.confirmed_at = Time.zone.now end + User.find_or_create_by!( + name: "Arthur", + email: "arthur.campbell@softwire.com", + organisation: org, + role: "support", + ) do |user| + user.password = "password" + user.confirmed_at = Time.zone.now + end + pp "Seeded 3 dummy users" end diff --git a/spec/db/seeds_spec.rb b/spec/db/seeds_spec.rb index fb41ccf36..f18f82522 100644 --- a/spec/db/seeds_spec.rb +++ b/spec/db/seeds_spec.rb @@ -24,7 +24,7 @@ RSpec.describe "seeding process", type: task do it "sets up correct data" do expect { Rails.application.load_seed - }.to change(User, :count).by(7) + }.to change(User, :count).by(8) .and change(Organisation, :count).by(8) .and change(OrganisationRelationship, :count).by(4) .and change(Scheme, :count).by(3)