Commit 7249c43d by 3rd-Eden

[minor] e-mail md5 should just accept an md5, not generate it

parent 781444d7
'use strict';
var crypto = require('crypto');
/**
* Retrieve personal / contact information.
*
......@@ -44,10 +42,9 @@ Person.prototype.email = function email() {
* @api public
*/
Person.prototype.md5 = function md5() {
var args = this.api.args(arguments, 'queue')
, md5 = crypto.createHash('md5').update(args.value).digest('hex');
var args = this.api.args(arguments, 'queue');
this.send({ emailMD5: md5 }, args);
this.send({ emailMD5: args.value }, args);
return this;
};
......
......@@ -9,4 +9,39 @@ describe('FullContact.Person', function () {
// The API key we use for testing.
//
var key = process.env.API_KEY;
//
// Some of the requests take a really long time, so set a really long timeout
//
this.timeout(20000);
describe('#email', function () {
it('retrieves data by e-mail');
it('provides the proper casing');
});
describe('#md5', function () {
it('retrieves data by md5 e-mail');
it('provides the proper casing');
});
describe('#md5', function () {
it('retrieves data by md5 e-mail');
it('provides the proper casing');
});
describe('#twitter', function () {
it('retrieves data by twitter handle');
it('provides the proper casing');
});
describe('#facebook', function () {
it('retrieves data by facebook username');
it('provides the proper casing');
});
describe('#phone', function () {
it('retrieves data by phone number');
it('provides the proper casing');
});
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment