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
77c919cb
Commit
77c919cb
authored
May 14, 2013
by
3rd-Eden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[test] Added more tests for the person API's
parent
f7b55e5d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
9 deletions
+30
-9
fullcontact.test.js
test/fullcontact.test.js
+4
-1
person.test.js
test/person.test.js
+26
-8
No files found.
test/fullcontact.test.js
View file @
77c919cb
...
...
@@ -88,7 +88,10 @@ describe('FullContact', function () {
api
.
person
.
email
(
'arnout@observe.it'
,
function
email
(
err
)
{
if
(
err
)
return
done
(
err
);
expect
(
api
.
remaining
).
to
.
be
.
below
(
remaining
);
//
// The value should be same as before or below
//
expect
(
api
.
remaining
).
to
.
be
.
below
(
remaining
+
1
);
done
();
});
});
...
...
test/person.test.js
View file @
77c919cb
...
...
@@ -17,33 +17,51 @@ describe('FullContact.Person', function () {
//
this
.
timeout
(
20000
);
//
// Pre-create an API instance
//
var
api
=
new
FullContact
(
key
);
describe
(
'#email'
,
function
()
{
it
(
'retrieves data by e-mail'
);
it
(
'provides the proper casing'
);
});
it
(
'retrieves data by e-mail'
,
function
(
done
)
{
api
.
person
.
email
(
'arnout@observe.it'
,
done
);
});
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'
);
var
md5
=
require
(
'crypto'
).
createHash
(
'md5'
)
.
update
(
'arnout@observe.it'
)
.
digest
(
'hex'
)
.
toString
();
it
(
'retrieves data by md5 e-mail'
,
function
(
done
)
{
api
.
person
.
md5
(
md5
,
done
);
});
it
(
'provides the proper casing'
);
});
describe
(
'#twitter'
,
function
()
{
it
(
'retrieves data by twitter handle'
);
it
(
'retrieves data by twitter handle'
,
function
(
done
)
{
api
.
person
.
twitter
(
'observe_it'
,
done
);
});
it
(
'provides the proper casing'
);
});
describe
(
'#facebook'
,
function
()
{
it
(
'retrieves data by facebook username'
);
it
(
'retrieves data by facebook username'
,
function
(
done
)
{
api
.
person
.
facebook
(
'arnout.kazemier'
,
done
);
});
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