Skip to content
This repository was archived by the owner on May 10, 2024. It is now read-only.

Commit ed0af58

Browse files
Carolina WrightCarolina Wright
authored andcommitted
DESIGNER-3439 fix tests
1 parent 7823b2c commit ed0af58

1 file changed

Lines changed: 6 additions & 12 deletions

File tree

test/spec/controllers/mocking-service-controller.js

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,7 @@ describe('mockingServiceController', function () {
160160
}));
161161

162162
it('should add `baseUri` when there is only RAML version tag', function () {
163-
selectedFile.mock = {
164-
baseUri: 'http://my.api.com'
165-
};
163+
selectedFile.mock = 'http://my.api.com';
166164

167165
$scope.editor.setValue([
168166
'#%RAML 0.8'
@@ -173,14 +171,12 @@ describe('mockingServiceController', function () {
173171

174172
$scope.editor.getValue().should.be.equal([
175173
'#%RAML 0.8',
176-
'baseUri: ' + selectedFile.mock.baseUri
174+
'baseUri: ' + selectedFile.mock
177175
].join('\n'));
178176
});
179177

180178
it('should add `baseUri` right after `---`', function () {
181-
selectedFile.mock = {
182-
baseUri: 'http://my.api.com'
183-
};
179+
selectedFile.mock = 'http://my.api.com';
184180

185181
$scope.editor.setValue([
186182
'#%RAML 0.8',
@@ -193,14 +189,12 @@ describe('mockingServiceController', function () {
193189
$scope.editor.getValue().should.be.equal([
194190
'#%RAML 0.8',
195191
'---',
196-
'baseUri: ' + selectedFile.mock.baseUri
192+
'baseUri: ' + selectedFile.mock
197193
].join('\n'));
198194
});
199195

200196
it('should replace `baseUri` with mocked one', function () {
201-
selectedFile.mock = {
202-
baseUri: 'http://my.api.com'
203-
};
197+
selectedFile.mock = 'http://my.api.com';
204198

205199
$scope.editor.setValue([
206200
'#%RAML 0.8',
@@ -215,7 +209,7 @@ describe('mockingServiceController', function () {
215209
'#%RAML 0.8',
216210
'---',
217211
'#baseUri: http://old.my.api.com',
218-
'baseUri: ' + selectedFile.mock.baseUri
212+
'baseUri: ' + selectedFile.mock
219213
].join('\n'));
220214
});
221215
}); // enabling mocking service

0 commit comments

Comments
 (0)