Skip to content

Commit ff1a6eb

Browse files
author
Myztiq
committed
Stubbed fetching plan.
1 parent b67ccc1 commit ff1a6eb

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

client/services/createAndBuildNewContainerService.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ function createAndBuildNewContainer(
1616
$q,
1717
$rootScope,
1818
createNewInstance,
19-
currentOrg,
2019
eventTracking,
2120
fetchInstancesByPod,
2221
fetchPlan,

test/unit/services/createAndBuildNewContainerService.unit.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ var helpCardsMock = require('../apiMocks/HelpCardServiceMock');
1313
var thisUser = runnable.newUser(apiMocks.user);
1414

1515
describe('createAndBuildNewContainer'.bold.underline.blue, function () {
16+
var mockFetchPlan;
17+
var mockPlan;
1618
var ctx = {};
1719

1820
function createMasterPods() {
@@ -49,7 +51,11 @@ describe('createAndBuildNewContainer'.bold.underline.blue, function () {
4951
ctx.pageNameMock = {
5052
setTitle: sinon.spy()
5153
};
52-
54+
mockPlan = {
55+
next: {
56+
id: '1234'
57+
}
58+
};
5359

5460
runnable.reset(apiMocks.user);
5561
angular.mock.module('app', function ($provide) {
@@ -61,6 +67,10 @@ describe('createAndBuildNewContainer'.bold.underline.blue, function () {
6167
$provide.factory('helpCards', helpCardsMock.create(ctx));
6268
$provide.factory('fetchInstancesByPod', fetchInstancesByPodMock.fetch());
6369
$provide.factory('createNewInstance', createNewInstanceMock.fetch());
70+
$provide.factory('fetchPlan', function ($q) {
71+
mockFetchPlan = sinon.stub().returns($q.when(mockPlan));
72+
return mockFetchPlan;
73+
});
6474
$provide.value('errs', ctx.errs);
6575
});
6676
angular.mock.inject(function (

0 commit comments

Comments
 (0)