Remove primaryEmail parameter from REST api.

This commit is contained in:
Tankred Hase
2017-08-23 18:19:59 +08:00
parent 4c28da4eab
commit 5fa36e6d52
2 changed files with 8 additions and 27 deletions

View File

@@ -68,26 +68,7 @@ describe('Koa App (HTTP Server) Integration Tests', function() {
.end(done);
});
it('should return 400 for an invalid primaryEmail', done => {
request(app.listen())
.post('/api/v1/key')
.send({publicKeyArmored, primaryEmail: 'foo'})
.expect(400)
.end(done);
});
it('should return 201 with primaryEmail', done => {
request(app.listen())
.post('/api/v1/key')
.send({publicKeyArmored, primaryEmail})
.expect(201)
.end(() => {
expect(emailParams).to.exist;
done();
});
});
it('should return 201 without primaryEmail', done => {
it('should return 201', done => {
request(app.listen())
.post('/api/v1/key')
.send({publicKeyArmored})
@@ -103,7 +84,7 @@ describe('Koa App (HTTP Server) Integration Tests', function() {
beforeEach(done => {
request(app.listen())
.post('/api/v1/key')
.send({publicKeyArmored, primaryEmail})
.send({publicKeyArmored})
.expect(201)
.end(done);
});
@@ -134,7 +115,7 @@ describe('Koa App (HTTP Server) Integration Tests', function() {
beforeEach(done => {
request(app.listen())
.post('/api/v1/key')
.send({publicKeyArmored, primaryEmail})
.send({publicKeyArmored})
.expect(201)
.end(done);
});
@@ -196,7 +177,7 @@ describe('Koa App (HTTP Server) Integration Tests', function() {
beforeEach(done => {
request(app.listen())
.post('/api/v1/key')
.send({publicKeyArmored, primaryEmail})
.send({publicKeyArmored})
.expect(201)
.end(done);
});
@@ -234,7 +215,7 @@ describe('Koa App (HTTP Server) Integration Tests', function() {
beforeEach(done => {
request(app.listen())
.post('/api/v1/key')
.send({publicKeyArmored, primaryEmail})
.send({publicKeyArmored})
.expect(201)
.end(() => {
request(app.listen())