Having just upgraded to 6.1 and utilising the option of having multiple services for active storage on models I have run into what seems like an issue.
Previously when testing ActiveStorage on my models as the default service when using ActiveStorage during test is
:test there were no issues in attaching items during tests.
However I have now given specific
:service_name to my models using ActiveStorage in testing it seems to ignore the default of
:test and revert to trying to call the actual service (which in test will not work for my setup).
My workaround is this:
has_many_attached :pdfs, service: Rails.env.test? ? :test : :s3_finalized_receipts
I don’t particularly like this and guess I am missing something here, any advice would be appreciated