Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fullcontact
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
prospector
fullcontact
Commits
7249c43d
Commit
7249c43d
authored
May 14, 2013
by
3rd-Eden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[minor] e-mail md5 should just accept an md5, not generate it
parent
781444d7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
5 deletions
+37
-5
person.js
endpoints/person.js
+2
-5
person.test.js
test/person.test.js
+35
-0
No files found.
endpoints/person.js
View file @
7249c43d
'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
;
};
...
...
test/person.test.js
View file @
7249c43d
...
...
@@ -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'
);
});
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment