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
aac1161b
Commit
aac1161b
authored
May 18, 2015
by
AdriVanHoudt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added tests for company api
parent
4f6d5453
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
2 deletions
+44
-2
company.js
endpoints/company.js
+2
-2
company.test.js
test/company.test.js
+42
-0
No files found.
endpoints/company.js
View file @
aac1161b
...
...
@@ -15,7 +15,7 @@ function Company(api) {
}
/**
* Retrie
c
e company information by domain
* Retrie
v
e company information by domain
*
* ```js
* fullcontact.company.domain('apple.com', [webhookUrl], [webhookId], fn);
...
...
@@ -24,7 +24,7 @@ function Company(api) {
* @returns {Company}
* @api public
*/
Company
.
prototype
.
domain
=
function
d
isposable
()
{
Company
.
prototype
.
domain
=
function
d
omain
()
{
var
args
=
this
.
api
.
args
(
arguments
,
'webhookUrl'
,
'webhookId'
);
this
.
send
({
domain
:
args
.
value
},
args
);
...
...
test/company.test.js
0 → 100644
View file @
aac1161b
describe
(
'FullContact.Company'
,
function
()
{
'use strict'
;
var
FullContact
=
require
(
'../'
);
var
chai
=
require
(
'chai'
);
chai
.
config
.
includeStack
=
true
;
//
// The API key we use for testing.
//
var
key
=
process
.
env
.
API_KEY
;
if
(
!
key
)
{
throw
new
Error
(
'Please provide your API using the API_KEY env variable.'
);
}
//
// Some of the requests take a really long time, so set a really long timeout
//
this
.
timeout
(
20000
);
//
// Pre-create an API instance
//
var
api
=
new
FullContact
(
key
);
describe
(
'#domain'
,
function
()
{
it
(
'retrieves data by domain'
,
function
(
done
)
{
api
.
company
.
domain
(
'apple.com'
,
done
);
});
it
(
'provides the proper casing'
);
});
describe
(
'#domain with webhook url/id'
,
function
()
{
it
(
'retrieves data by e-mail and sets up a webhook with the right url and id'
,
function
(
done
)
{
api
.
company
.
domain
(
'apple.com'
,
'http://requestb.in/1bxgb751'
,
'webhookTest'
,
done
);
});
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