DEV: use the existing parsePostData function (#9629)
This commit is contained in:
parent
70b1e98609
commit
a2c85f0845
|
@ -1,15 +1,12 @@
|
||||||
import { acceptance, loggedInUser } from "helpers/qunit-helpers";
|
import { acceptance, loggedInUser } from "helpers/qunit-helpers";
|
||||||
import pretender from "helpers/create-pretender";
|
import pretender from "helpers/create-pretender";
|
||||||
|
import { parsePostData } from "helpers/create-pretender";
|
||||||
|
|
||||||
acceptance("Bookmarking", { loggedIn: true });
|
acceptance("Bookmarking", { loggedIn: true });
|
||||||
|
|
||||||
function handleRequest(assert, request) {
|
function handleRequest(assert, request) {
|
||||||
const body = request.requestBody;
|
const data = parsePostData(request.requestBody);
|
||||||
const reminderType = body
|
assert.step(data.reminder_type || "none");
|
||||||
.substr(0, body.indexOf("&"))
|
|
||||||
.replace("reminder_type=", "");
|
|
||||||
|
|
||||||
assert.step(reminderType || "none");
|
|
||||||
|
|
||||||
return [
|
return [
|
||||||
200,
|
200,
|
||||||
|
|
Loading…
Reference in New Issue