Skip to content

Commit 76c02f9

Browse files
committed
Added tests
1 parent e673339 commit 76c02f9

File tree

1 file changed

+42
-1
lines changed

1 file changed

+42
-1
lines changed

smoke_test/smoke_test.js

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,45 @@ describe('Devices List', function(){
4242
done(error)
4343
});
4444
});
45-
});
45+
});
46+
47+
describe('Thing List', function(){
48+
it('thing list return 200 OK', function(done) {
49+
getToken().then(function(token) {
50+
var client = IotApi.ApiClient.instance;
51+
// Configure OAuth2 access token for authorization: oauth2
52+
var oauth2 = client.authentications['oauth2'];
53+
oauth2.accessToken = token;
54+
55+
var api = new IotApi.ThingsV2Api(client)
56+
api.thingsV2List().then(function() {
57+
done();
58+
}, function(error) {
59+
done(error);
60+
});
61+
}, function(error) {
62+
done(error)
63+
});
64+
});
65+
});
66+
67+
describe('Dashboard List', function(){
68+
it('dashboard list return 200 OK', function(done) {
69+
getToken().then(function(token) {
70+
var client = IotApi.ApiClient.instance;
71+
// Configure OAuth2 access token for authorization: oauth2
72+
var oauth2 = client.authentications['oauth2'];
73+
oauth2.accessToken = token;
74+
75+
var api = new IotApi.DashboardsV2Api(client)
76+
api.dashboardsV2List().then(function() {
77+
done();
78+
}, function(error) {
79+
done(error);
80+
});
81+
}, function(error) {
82+
done(error)
83+
});
84+
});
85+
});
86+

0 commit comments

Comments
 (0)