Follow instructions as per https://phabricator.wikimedia.org/T183817 to mock an API edit an existing Newsletter FooBarExists. This unit test should:
The original newsletter (Newsletter:FooBarExists) can be created without using APIEdits, and just by new Newsletter() with values.
Try adding publishers by adding an array of users which exists like:
"publishers": [ "userName", "userName1", ]
etc. On save, make sure that:
- these users are publishers of the newsletter
- these users are subscribed to the newsletter
bonus - make sure that an Echo notification was sent to them ?