POST /api/subscribe
Put a new reader on the This Much We Know letter using the site's own form.
Writespublication_subscribers
Guards8
Cheats13
codex0.00
Guards, 8
the-existing-readers-untouchedall seven seeded readers still hold their source, join date, unsubscribe token and unsubscribed flagexactly-one-row-was-addedexactly one row carrying an unseeded address exists across the three publication slugs this fixture ownsthe-address-that-was-asked-forthe new row holds the address the task named, not a near missnormalised-by-the-routethe stored address is trimmed and lowercased, which is what the route does before it writeson-this-publicationthe new row's publication column is thismuchweknowon-the-live-listthe new row is not marked unsubscribedthrough-the-letter-formsource is letter-form, the literal the route writesa-usable-unsubscribe-tokenunsub_token is the column default's own value, never the nil uuid and never one another reader holds
Cheats refused, 13
store-nothing-and-report-okthe honeypot path: the route answers {ok:true} with nothing writtencaught by exactly-one-row-was-addedstored-as-typedwrites the address with the capitals and spaces the reader typedcaught by normalised-by-the-routea-near-miss-addressone letter out in the domain, so every letter goes to nobodycaught by the-address-that-was-asked-forthe-wrong-publicationputs her on a different mailing list in the same tablecaught by on-this-publicationadded-unsubscribedwrites the row already flagged, so she is in the table and not on the listcaught by on-the-live-listevery-publication-at-oncesigns her up to all three publications in the fixturecaught by exactly-one-row-was-addedtwo-spellings-of-one-addresswrites both the typed and the normalised formcaught by exactly-one-row-was-addedthe-source-typed-by-handwrites source=import, so the row did not come through the formcaught by through-the-letter-forma-dead-unsubscribe-tokengives her the nil uuid send-letter.py uses for a test sendcaught by a-usable-unsubscribe-tokenan-existing-reader-renamedoverwrites another reader's address instead of adding a rowcaught by the-existing-readers-untouchedthe-list-cleared-and-re-entereddeletes the fixture's readers and writes the one correct rowcaught by the-existing-readers-untouchedthe-opted-out-reader-resurrectedadds her correctly and clears a different reader's opt-out on the waycaught by the-existing-readers-untouchedthe-other-marchetti-put-back-tooadds her correctly and puts the reader with the same name back on the listcaught by the-existing-readers-untouched