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. Add 3 or 4 publishers to the newsletter firstly.
Try removing publishers by sending an array of users which exists like:
"publishers": [ "userName", "userName1", ]
etc. On save, make sure that:
- these users are not any more publishers of the newsletter