|
15 | 15 | */ |
16 | 16 | import * as should from 'should' |
17 | 17 |
|
18 | | -import {Api} from '../src/node' |
| 18 | +import {NodeApi} from '../src/node' |
19 | 19 |
|
20 | 20 | describe('Create new instance for API', function() { |
21 | 21 | it('should have methods', function() { |
22 | | - const api = new Api({url: 'http://localhost'}) |
| 22 | + const api = new NodeApi({url: 'http://localhost'}) |
23 | 23 | should(api.copy) |
24 | 24 | .be.a.Function() |
25 | 25 | .and.has.lengthOf(5) |
@@ -77,17 +77,17 @@ describe('Create new instance for API', function() { |
77 | 77 | }) |
78 | 78 |
|
79 | 79 | it('should set correct API path based on passed configuration (version is passed)', function() { |
80 | | - const api = new Api({url: 'http://localhost', version: '2.0'}) |
| 80 | + const api = new NodeApi({url: 'http://localhost', version: '2.0'}) |
81 | 81 | should(api._httpOptions.path).equal('/attask/api/v2.0') |
82 | 82 | }) |
83 | 83 |
|
84 | 84 | it('should set correct API path based on passed configuration (version is not passed)', function() { |
85 | | - const api = new Api({url: 'http://localhost'}) |
| 85 | + const api = new NodeApi({url: 'http://localhost'}) |
86 | 86 | should(api._httpOptions.path).equal('/attask/api-internal') |
87 | 87 | }) |
88 | 88 |
|
89 | 89 | it('should set correct API path based on passed configuration (version="asp")', function() { |
90 | | - const api = new Api({url: 'http://localhost', version: 'asp'}) |
| 90 | + const api = new NodeApi({url: 'http://localhost', version: 'asp'}) |
91 | 91 | should(api._httpOptions.path).equal('/attask/api-asp') |
92 | 92 | }) |
93 | 93 | }) |
0 commit comments