Page MenuHomePhabricator

[Unit testing] Add unit tests to API operations on Newsletter namespace
Closed, ResolvedPublic

Description

You can create a newsletter by using a JSON like:

{
    "description": "This is a test description. This is a test description. This is a test description. This is a test description.",
    "mainpage": "Foo",
    "publishers": [
        "userName"
    ]
}

and POSTing to the action=edit&title=Newsletter:Foobar with the right token to create a newsletter. You can see this in action from Special:ApiSandbox in your local install - with action=edit, and text = the JSON above.

This task is to unit test interactions with API edit on Newsletter namespace.

Tests in this direction can go to tests/content/NewsletterAPIEditTest.php

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 30 2017, 3:48 PM
01tonythomas updated the task description. (Show Details)Dec 30 2017, 3:51 PM

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

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

Change 401115 merged by jenkins-bot:
[mediawiki/extensions/Newsletter@master] Add unit test for creation of newsletters via API

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

Change 401185 had a related patch set uploaded (by Pppery; owner: Pppery):
[mediawiki/extensions/Newsletter@master] Add unit tests for changing description and main page of newsletters via API

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

Change 401185 merged by jenkins-bot:
[mediawiki/extensions/Newsletter@master] Add unit tests for changing description and main page of newsletters via API

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

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 updated the task description. (Show Details)Jan 1 2018, 3:07 AM

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

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

Pppery claimed this task.Jan 2 2018, 1:52 AM

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

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

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

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

Pppery closed this task as Resolved.Feb 1 2018, 12:31 PM
Pppery removed a project: Patch-For-Review.