Geo Replication - Refactor Axios Tests in actions_spec.js
The following discussions from !26702 (merged) should be addressed:
-
@markrian started a discussion: (+1 comment) Is there much value in asserting that a particular URL is hit? It feels like this is an implementation detail. This test already asserts that the correct data is passed to the mutations/actions. WDYT of reverting this hunk?
If you do want to assert the correct URL is hit, what is usually done is setting the axios mock accordingly, e.g., with
mock.onGet(/geo_replication/${MOCK_REPLICABLE_TYPE})
, or similar.The existing testing pattern in
ee/spec/frontend/geo_designs/store/actions_spec.js
is a bit odd, in that the axios mock is configured to respond with data to any request path. It's not worth changing in this MR, but WDYT of opening a follow-up issue to refactor these?