Add HTTP integration tests

This commit is contained in:
Tankred Hase
2016-06-01 15:20:49 +02:00
parent a27e833a8d
commit 45b7b95a5f
3 changed files with 413 additions and 23 deletions

View File

@@ -61,6 +61,7 @@ class REST {
ctx.throw(400, 'Invalid request!');
}
yield this._userId.verify(q);
ctx.body = 'Key successfully verified!';
}
/**
@@ -97,6 +98,7 @@ class REST {
ctx.throw(400, 'Invalid request!');
}
yield this._publicKey.requestRemove(q);
ctx.status = 202;
}
/**
@@ -109,6 +111,7 @@ class REST {
ctx.throw(400, 'Invalid request!');
}
yield this._publicKey.verifyRemove(q);
ctx.body = 'Key successfully removed!';
}
}