Page MenuHomePhabricator

[Unit testing] For an existing newsletter `FooBarExists`, API edits to add publishers should work
Closed, ResolvedPublic

Description

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:

  1. these users are publishers of the newsletter
  2. these users are subscribed to the newsletter

bonus - make sure that an Echo notification was sent to them ?

Details

Related Gerrit Patches:
mediawiki/extensions/Newsletter : masterAdd unit test for adding publishers via API

Event Timeline

Change 401189 had a related patch set uploaded (by Pppery; owner: Pppery):
[mediawiki/extensions/Newsletter@master] Add unit test for adding publishers via API

https://gerrit.wikimedia.org/r/401189

Pppery claimed this task.Dec 31 2017, 6:44 PM

Change 401189 merged by jenkins-bot:
[mediawiki/extensions/Newsletter@master] Add unit test for adding publishers via API

https://gerrit.wikimedia.org/r/401189

01tonythomas closed this task as Resolved.Feb 1 2018, 4:44 AM

All patchsets merged, closing now. Thanks.