1 | require('should');
|
2 |
|
3 | const zapier = require('zapier-platform-core');
|
4 |
|
5 | const App = require('../../index');
|
6 | const appTester = zapier.createAppTester(App);
|
7 |
|
8 | describe('Search - <%= key %>', () => {
|
9 | zapier.tools.env.inject();
|
10 |
|
11 | it('should get an array', async () => {
|
12 | const bundle = {
|
13 | authData: <%= authData %>,
|
14 | <% if (inputData) { %>
|
15 | inputData: <%= inputData %>
|
16 | <% } %>
|
17 | };
|
18 |
|
19 | const results = await appTester(App.searches['<%= key %>'].operation.perform, bundle);
|
20 | results.should.be.an.Array();
|
21 | results.length.should.be.aboveOrEqual(1);
|
22 | results[0].should.have.property('id');
|
23 | });
|
24 | });
|
25 |
|
\ | No newline at end of file |