@@ -12,63 +12,63 @@ describe('contacts', () => {
1212 nock ( 'https://api.intercom.io' ) . post ( '/contacts' ) . reply ( 200 , { } ) ;
1313 const client = new Client ( 'foo' , 'bar' ) . usePromises ( ) ;
1414 client . leads . create ( ) . then ( r => {
15- assert . equal ( 200 , r . status ) ;
15+ assert . equal ( 200 , r . statusCode ) ;
1616 done ( ) ;
1717 } ) ;
1818 } ) ;
1919 it ( 'should be created with parameters' , done => {
2020 nock ( 'https://api.intercom.io' ) . post ( '/contacts' , { foo : 'bar' } ) . reply ( 200 , { } ) ;
2121 const client = new Client ( 'foo' , 'bar' ) . usePromises ( ) ;
2222 client . leads . create ( { foo : 'bar' } ) . then ( r => {
23- assert . equal ( 200 , r . status ) ;
23+ assert . equal ( 200 , r . statusCode ) ;
2424 done ( ) ;
2525 } ) ;
2626 } ) ;
2727 it ( 'should be updated' , done => {
2828 nock ( 'https://api.intercom.io' ) . post ( '/contacts' , { id : 'baz' , email : 'foo@intercom.io' } ) . reply ( 200 , { } ) ;
2929 const client = new Client ( 'foo' , 'bar' ) . usePromises ( ) ;
3030 client . leads . update ( { id : 'baz' , email : 'foo@intercom.io' } ) . then ( r => {
31- assert . equal ( 200 , r . status ) ;
31+ assert . equal ( 200 , r . statusCode ) ;
3232 done ( ) ;
3333 } ) ;
3434 } ) ;
3535 it ( 'should list' , done => {
3636 nock ( 'https://api.intercom.io' ) . get ( '/contacts' ) . reply ( 200 , { } ) ;
3737 const client = new Client ( 'foo' , 'bar' ) . usePromises ( ) ;
3838 client . leads . list ( ) . then ( r => {
39- assert . equal ( 200 , r . status ) ;
39+ assert . equal ( 200 , r . statusCode ) ;
4040 done ( ) ;
4141 } ) ;
4242 } ) ;
4343 it ( 'should list by params' , done => {
4444 nock ( 'https://api.intercom.io' ) . get ( '/contacts' ) . query ( { email : 'jayne@serenity.io' } ) . reply ( 200 , { } ) ;
4545 const client = new Client ( 'foo' , 'bar' ) . usePromises ( ) ;
4646 client . leads . listBy ( { email : 'jayne@serenity.io' } ) . then ( r => {
47- assert . equal ( 200 , r . status ) ;
47+ assert . equal ( 200 , r . statusCode ) ;
4848 done ( ) ;
4949 } ) ;
5050 } ) ;
5151 it ( 'should find by id' , done => {
5252 nock ( 'https://api.intercom.io' ) . get ( '/contacts/baz' ) . reply ( 200 , { } ) ;
5353 const client = new Client ( 'foo' , 'bar' ) . usePromises ( ) ;
5454 client . leads . find ( { id : 'baz' } ) . then ( r => {
55- assert . equal ( 200 , r . status ) ;
55+ assert . equal ( 200 , r . statusCode ) ;
5656 done ( ) ;
5757 } ) ;
5858 } ) ;
5959 it ( 'should find by user_id' , done => {
6060 nock ( 'https://api.intercom.io' ) . get ( '/contacts?user_id=baz' ) . reply ( 200 , { } ) ;
6161 const client = new Client ( 'foo' , 'bar' ) . usePromises ( ) ;
6262 client . leads . find ( { user_id : 'baz' } ) . then ( r => {
63- assert . equal ( 200 , r . status ) ;
63+ assert . equal ( 200 , r . statusCode ) ;
6464 done ( ) ;
6565 } ) ;
6666 } ) ;
6767 it ( 'delete by id' , done => {
6868 nock ( 'https://api.intercom.io' ) . delete ( '/contacts/baz' ) . reply ( 200 , { } ) ;
6969 const client = new Client ( 'foo' , 'bar' ) . usePromises ( ) ;
7070 client . leads . delete ( { id : 'baz' } ) . then ( r => {
71- assert . equal ( 200 , r . status ) ;
71+ assert . equal ( 200 , r . statusCode ) ;
7272 done ( ) ;
7373 } ) ;
7474 } ) ;
@@ -80,7 +80,7 @@ describe('contacts', () => {
8080 nock ( 'https://api.intercom.io' ) . post ( '/contacts/convert' , conversionObject ) . reply ( 200 , { } ) ;
8181 const client = new Client ( 'foo' , 'bar' ) . usePromises ( ) ;
8282 client . leads . convert ( conversionObject ) . then ( r => {
83- assert . equal ( 200 , r . status ) ;
83+ assert . equal ( 200 , r . statusCode ) ;
8484 done ( ) ;
8585 } ) ;
8686 } ) ;
0 commit comments