Key upload and sending verification email works
This commit is contained in:
@@ -37,12 +37,19 @@ describe.skip('Koa App (HTTP Server) Integration Tests', function() {
|
||||
|
||||
describe('HKP api', function() {
|
||||
describe('GET /pks/add', function() {
|
||||
it('should return 200 for a valid request', function (done) {
|
||||
it.skip('should return 200 for a valid request', function (done) {
|
||||
request(app.listen())
|
||||
.get('/pks/lookup?op=get&search=0xDBC0B3D92B1B86E9')
|
||||
.expect(200)
|
||||
.end(done);
|
||||
});
|
||||
|
||||
it('should return 404 if not found', function (done) {
|
||||
request(app.listen())
|
||||
.get('/pks/lookup?op=get&search=0xDBC0B3D92A1B86E9')
|
||||
.expect(404)
|
||||
.end(done);
|
||||
});
|
||||
});
|
||||
|
||||
describe('POST /pks/add', function() {
|
||||
@@ -55,12 +62,12 @@ describe.skip('Koa App (HTTP Server) Integration Tests', function() {
|
||||
.end(done);
|
||||
});
|
||||
|
||||
it('should return 200 for a valid PGP key', function (done) {
|
||||
it('should return 201 for a valid PGP key', function (done) {
|
||||
request(app.listen())
|
||||
.post('/pks/add')
|
||||
.type('form')
|
||||
.send('keytext=' + encodeURIComponent(pgpKey1))
|
||||
.expect(200)
|
||||
.expect(201)
|
||||
.end(done);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -25,12 +25,15 @@ describe('Email Integration Tests', function() {
|
||||
}
|
||||
email = new Email(nodemailer);
|
||||
email.init({
|
||||
host: credentials.smtp.host,
|
||||
host: process.env.SMTP_HOST || credentials.smtp.host,
|
||||
auth: {
|
||||
user: credentials.smtp.user,
|
||||
pass: credentials.smtp.pass
|
||||
user: process.env.SMTP_USER || credentials.smtp.user,
|
||||
pass: process.env.SMTP_PASS || credentials.smtp.pass
|
||||
},
|
||||
sender: credentials.sender
|
||||
sender: {
|
||||
name: process.env.SENDER_NAME || credentials.sender.name,
|
||||
email: process.env.SENDER_EMAIL || credentials.sender.email
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user