Wikimedia

[Unit testing] Add unit tests to Newsletter create operations

So here are things that happens on creating a newsletter via Special:CreateNewsletter

  1. User types in valid data for fields in CreateNewsletter and submits with wiki page with information of newsletter as Foo and name of the Newsletter as FooBar
  2. This information is saved on the database with the created user added as a publisher of the newsletter, and subscribed to it. The created user should be the only one at that point.
  3. A page is created in Newsletter namespace with the title Newsletter:FooBar with the NewsletterContentModel and will have a json similar to:
{
    "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"
    ]
}

Since these are dependent tasks, I will create this as one big GCI task.

Task tags

  • php
  • newsletter

Students who completed this task

pppery

Task type

  • code Code
  • done_all Quality Assurance
close

2017