Wikimedia
[Unit testing] For an existing newsletter `FooBarExists`, API edits to remove publishers should work
This task is about the newsletter extension.
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
- these users are not subscribed to the newsletter anymore
Task tags
Students who completed this task
pppery