Follow-up from "Refactor Service#test to use service object"
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
The following discussion from !31854 (merged) should be addressed:
-
@patrickbajao started a discussion: (+7 comments) Since we are stubbing the
test
method of theintegration
, I think we can just use adouble
(e.g.instance_double(Service)
) for this (and other instances where we defineintegration
). WDYT?
There is also a relevant discussion in !31854 (diffs, comment 347154801)
Context
The discussion is about removing / reducing the coupling between the Service model (an integration) and the service object Integrations::Test::ProjectService
.
Right now, the event
param is optional thus we need some logic to have a proper fallback. This is required because the frontend does not currently pass in a value for the event
. Ideally, once the frontend passes this value, we should be able to refactor and remove this coupling and improve the code a bit.