Allow use of `USE_FOG_IN_TESTS` env var

This commit is contained in:
Karina Kwiatek 2023-03-05 20:37:25 +01:00
parent 36c52db8b9
commit f3c7132103
2 changed files with 10 additions and 6 deletions

View File

@ -7,10 +7,12 @@ describe Settings::ProfilePictureController, type: :controller do
subject { patch :update, params: { user: avatar_params } } subject { patch :update, params: { user: avatar_params } }
before do before do
if ENV["USE_FOG_IN_TESTS"].blank?
stub_const("APP_CONFIG", { stub_const("APP_CONFIG", {
"fog" => {}, "fog" => {},
}) })
end end
end
let(:avatar_params) do let(:avatar_params) do
{ {

View File

@ -4,10 +4,12 @@ require "rails_helper"
describe UseCase::DataExport::User, :data_export do describe UseCase::DataExport::User, :data_export do
before do before do
if ENV["USE_FOG_IN_TESTS"].blank?
stub_const("APP_CONFIG", { stub_const("APP_CONFIG", {
"fog" => {}, "fog" => {},
}) })
end end
end
let(:user_params) do let(:user_params) do
{ {