-
-
Notifications
You must be signed in to change notification settings - Fork 199
Open
Labels
Description
Follow up to #2321
Currently the Flodesk client is intentionally enabled when running in the test environment as a result of setting the Flodesk API to "test" in the initializer:
key = Rails.env.test? ? 'test' : ENV['FLODESK_KEY'] |
This means all requests to Flodesk that are triggered during tests will be failing due to the invalid API key.
Requests will be triggered whenever we fabricate a student or a coach (as a result of a after_create
callback on Subscription
).
We can avoid the unnecessary requests, and potentially improve test performance by mocking out Flodesk::Client