DEV: use the existing parsePostData function (#9629)

This commit is contained in:
Joffrey JAFFEUX 2020-05-04 18:35:04 +02:00 committed by GitHub
parent 70b1e98609
commit a2c85f0845
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 6 deletions

View File

@ -1,15 +1,12 @@
import { acceptance, loggedInUser } from "helpers/qunit-helpers";
import pretender from "helpers/create-pretender";
import { parsePostData } from "helpers/create-pretender";
acceptance("Bookmarking", { loggedIn: true });
function handleRequest(assert, request) {
const body = request.requestBody;
const reminderType = body
.substr(0, body.indexOf("&"))
.replace("reminder_type=", "");
assert.step(reminderType || "none");
const data = parsePostData(request.requestBody);
assert.step(data.reminder_type || "none");
return [
200,