Skip to content

Commit c8eaa58

Browse files
committed
correct typo in developerapp error message
1 parent 76bf4be commit c8eaa58

File tree

2 files changed

+28
-3
lines changed

2 files changed

+28
-3
lines changed

lib/developerApp.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
return cb(new Error("missing required input: appName"));
5656
}
5757
if ( !product) {
58-
return cb(new Error("missing required input: apiProduct}"));
58+
return cb(new Error("missing required input: apiProduct"));
5959
}
6060
if (conn.verbosity>0) {
6161
utility.logWrite(sprintf('Create App %s for %s', name, email));

test/developerApp.js

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ describe('DeveloperApp', function() {
101101

102102
});
103103

104-
105104
it('should fail to create a developer app - no name', () => {
106105
const options = {
107106
developerEmail,
@@ -111,7 +110,33 @@ describe('DeveloperApp', function() {
111110
return edgeOrg.developerapps.create(options)
112111
.then( () => assert.fail('should not be reached'))
113112
.catch( error => {
114-
assert.equal(error, "Error: missing required inputs, one of {developer, appName, apiProduct}");
113+
assert.equal(error, 'Error: missing required input: appName');
114+
} );
115+
});
116+
117+
it('should fail to create a developer app - no developer', () => {
118+
const options = {
119+
name : entityName + '-C',
120+
apiProduct : faker.random.alphaNumeric(22)
121+
};
122+
123+
return edgeOrg.developerapps.create(options)
124+
.then( () => assert.fail('should not be reached'))
125+
.catch( error => {
126+
assert.equal(error, 'Error: missing required input: email');
127+
} );
128+
});
129+
130+
it('should fail to create a developer app - no product', () => {
131+
const options = {
132+
developerEmail,
133+
name : entityName + '-D'
134+
};
135+
136+
return edgeOrg.developerapps.create(options)
137+
.then( () => assert.fail('should not be reached'))
138+
.catch( error => {
139+
assert.equal(error, 'Error: missing required input: apiProduct');
115140
} );
116141
});
117142

0 commit comments

Comments
 (0)