From 9aeefdc2db7a964393924bcda9de49c2f20c7fce Mon Sep 17 00:00:00 2001 From: elasticspoon Date: Fri, 3 May 2024 16:41:49 -0400 Subject: [PATCH] fix: test failures from removing seeding --- spec/requests/donations_requests_spec.rb | 3 ++- spec/requests/purchases_requests_spec.rb | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/spec/requests/donations_requests_spec.rb b/spec/requests/donations_requests_spec.rb index da63bd2c8c..dc7aa8d6a0 100644 --- a/spec/requests/donations_requests_spec.rb +++ b/spec/requests/donations_requests_spec.rb @@ -3,6 +3,7 @@ RSpec.describe "Donations", type: :request, skip_seed: true do let(:organization) { create(:organization, skip_items: true) } let(:user) { create(:user, organization: organization) } + let(:organization_admin) { create(:organization_admin, organization: organization) } let(:default_params) do { organization_name: organization.to_param } @@ -114,7 +115,7 @@ context "with an inactive item - organization admin user" do before do - sign_in(@organization_admin) + sign_in(organization_admin) item.update(active: false) end diff --git a/spec/requests/purchases_requests_spec.rb b/spec/requests/purchases_requests_spec.rb index aaee97f623..3347093fe8 100644 --- a/spec/requests/purchases_requests_spec.rb +++ b/spec/requests/purchases_requests_spec.rb @@ -3,6 +3,7 @@ RSpec.describe "Purchases", type: :request, skip_seed: true do let(:organization) { create(:organization, skip_items: true) } let(:user) { create(:user, organization: organization) } + let(:organization_admin) { create(:organization_admin, organization: organization) } let(:default_params) do { organization_name: organization.to_param } @@ -279,7 +280,7 @@ context "with an inactive item - organization admin user" do before do - sign_in(@organization_admin) + sign_in(organization_admin) item.update(active: false) end @@ -311,7 +312,7 @@ context "While signed in as an organizational admin" do before do - sign_in(create(:organization_admin, organization: organization)) + sign_in(organization_admin) end describe "DELETE #destroy" do