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 ?

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

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

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

All patchsets merged, closing now. Thanks.