Wikimedia

[Unit testing] For an existing newsletter `FooBarExists`, API edits to add publishers should work in 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.

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 ?

Task tags

  • mediawiki
  • php
  • newsletter

Students who completed this task

pppery

Task type

  • code Code
  • done_all Quality Assurance
close

2017