mongodb-stitch
Advanced tools
Comparing version 3.2.15 to 3.2.16
@@ -150,4 +150,4 @@ 'use strict'; | ||
return { | ||
list: function list() { | ||
return api._get(groupUrl); | ||
list: function list(filter) { | ||
return api._get(groupUrl, filter); | ||
}, | ||
@@ -286,2 +286,17 @@ create: function create(data, options) { | ||
deploy: function deploy() { | ||
return { | ||
deployments: function deployments() { | ||
return { | ||
list: function list(filter) { | ||
return api._get(appUrl + '/deployments', filter); | ||
}, | ||
get: function get(commit) { | ||
return api._get(appUrl + '/deployments/' + commit); | ||
} | ||
}; | ||
} | ||
}; | ||
}, | ||
services: function services() { | ||
@@ -288,0 +303,0 @@ return { |
@@ -17,4 +17,4 @@ 'use strict'; | ||
var version = 'unknown'; | ||
if (typeof "3.2.15" !== 'undefined') { | ||
version = "3.2.15"; | ||
if (typeof "3.2.16" !== 'undefined') { | ||
version = "3.2.16"; | ||
} | ||
@@ -21,0 +21,0 @@ var SDK_VERSION = exports.SDK_VERSION = version; |
{ | ||
"name": "mongodb-stitch", | ||
"version": "3.2.15", | ||
"version": "3.2.16", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "author": "", |
@@ -126,3 +126,3 @@ /* global window, fetch */ | ||
return { | ||
list: () => api._get(groupUrl), | ||
list: (filter) => api._get(groupUrl, filter), | ||
create: (data, options) => { | ||
@@ -198,2 +198,9 @@ let query = (options && options.product) ? `?product=${options.product}` : ''; | ||
deploy: () => ({ | ||
deployments: () => ({ | ||
list: (filter) => api._get(`${appUrl}/deployments`, filter), | ||
get: (commit) => api._get(`${appUrl}/deployments/${commit}`) | ||
}) | ||
}), | ||
services: () => ({ | ||
@@ -200,0 +207,0 @@ list: () => api._get(`${appUrl}/services`), |
@@ -48,2 +48,20 @@ const StitchMongoFixture = require('../fixtures/stitch_mongo_fixture'); | ||
}); | ||
describe('when createApp is called with a specific product type', () => { | ||
let app; | ||
const otherProductTestAppName = 'atlas-app'; | ||
beforeEach(async() => { | ||
app = await th.createApp(otherProductTestAppName, { product: 'atlas' }); | ||
}); | ||
it('should successfully create the app', () => { | ||
expect(app).toBeDefined(); | ||
expect(app.name).toEqual(otherProductTestAppName); | ||
}); | ||
it('should only display apps of a product type when the list function is called with that filter', async() => { | ||
const apps = (await th.apps().list({ product: 'atlas' })); | ||
expect(apps).toHaveLength(1); | ||
expect(apps[0]).toEqual(app); | ||
}); | ||
}); | ||
}); |
@@ -231,3 +231,11 @@ const StitchMongoFixture = require('../fixtures/stitch_mongo_fixture'); | ||
let fetchedWebhook = await services.service(newSvc._id).incomingWebhooks().incomingWebhook(newWebhook._id).get(); | ||
expect(fetchedWebhook).toEqual(Object.assign({}, newWebhook, updatedWebhook)); | ||
const expectedWebhookWithUpdates = Object.assign({}, newWebhook, updatedWebhook); | ||
expect(fetchedWebhook._id).toEqual(expectedWebhookWithUpdates._id); | ||
expect(fetchedWebhook.name).toEqual(expectedWebhookWithUpdates.name); | ||
expect(fetchedWebhook.function_source).toEqual(expectedWebhookWithUpdates.function_source); | ||
expect(fetchedWebhook.options).toEqual(expectedWebhookWithUpdates.options); | ||
expect(fetchedWebhook.respond_result).toEqual(expectedWebhookWithUpdates.respond_result); | ||
expect(fetchedWebhook.run_as_user_id).toEqual(expectedWebhookWithUpdates.run_as_user_id); | ||
expect(fetchedWebhook.run_as_user_id_script_source).toEqual(expectedWebhookWithUpdates.run_as_user_id_script_source); | ||
}); | ||
@@ -234,0 +242,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
4757698
122
24242
74