artsy / aprb

[Deprecated] Artsy public radio notifications in Slack.
MIT License
10 stars 11 forks source link

Commerce errors #164

Closed ashkan18 closed 5 years ago

ashkan18 commented 5 years ago

Problem

https://artsyproduct.atlassian.net/browse/PURCHASE-958

Solution

Start act upon newly added error events coming from Exchange.

Adding that complicated the existing Aprb.Views.CommerceSlackView so ended up separating that file to multiple view files for different types of slack messages.

Extra (or you could call it technical debt)

Added missing tests for order views. Still adding more but this should be good to review.

Dependency Injection?!

For adding tests for view layer, we had to mock few Gravity calls so ended up following this dependency injection approach so now in test mode we use GravityMock and in other cases we use Gravity for fetching data from Gravity.

Selfie

image

sweir27 commented 5 years ago

@ashkan18 is your screenshot correct? Does the most recent version include the Code as well?

ashkan18 commented 5 years ago

@sweir27 it was old, (and there was a bug) fixed it :)

thanks all, merging 🙌