Skip to content

Commit ff23067

Browse files
committed
Change domain to example
1 parent a0a1782 commit ff23067

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

spec/FilesController.spec.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -225,11 +225,11 @@ describe('FilesController', () => {
225225
adapterWithReturn.createFile = () => {
226226
return Promise.resolve({
227227
name: 'newFilename.txt',
228-
url: 'http://new.url/newFilename.txt'
228+
url: 'http://example.com/newFilename.txt'
229229
});
230230
};
231231
adapterWithReturn.getFileLocation = () => {
232-
return Promise.resolve('http://default.url/file.txt');
232+
return Promise.resolve('http://example.com/file.txt');
233233
};
234234
const controllerWithReturn = new FilesController(adapterWithReturn, null, { preserveFileName: true });
235235

@@ -241,7 +241,7 @@ describe('FilesController', () => {
241241
);
242242

243243
expect(result.name).toBe('newFilename.txt');
244-
expect(result.url).toBe('http://new.url/newFilename.txt');
244+
expect(result.url).toBe('http://example.com/newFilename.txt');
245245
});
246246

247247
it('should use original filename and generate url when adapter returns nothing', async () => {
@@ -251,7 +251,7 @@ describe('FilesController', () => {
251251
return Promise.resolve();
252252
};
253253
adapterWithoutReturn.getFileLocation = (config, filename) => {
254-
return Promise.resolve(`http://default.url/${filename}`);
254+
return Promise.resolve(`http://example.com/${filename}`);
255255
};
256256

257257
const controllerWithoutReturn = new FilesController(adapterWithoutReturn, null, { preserveFileName: true });
@@ -264,19 +264,19 @@ describe('FilesController', () => {
264264
);
265265

266266
expect(result.name).toBe('originalFile.txt');
267-
expect(result.url).toBe('http://default.url/originalFile.txt');
267+
expect(result.url).toBe('http://example.com/originalFile.txt');
268268
});
269269

270270
it('should use original filename when adapter returns only url', async () => {
271271
const config = Config.get(Parse.applicationId);
272272
const adapterWithOnlyURL = { ...mockAdapter };
273273
adapterWithOnlyURL.createFile = () => {
274274
return Promise.resolve({
275-
url: 'http://new.url/partialFile.txt'
275+
url: 'http://example.com/partialFile.txt'
276276
});
277277
};
278278
adapterWithOnlyURL.getFileLocation = () => {
279-
return Promise.resolve('http://default.url/file.txt');
279+
return Promise.resolve('http://example.com/file.txt');
280280
};
281281

282282
const controllerWithPartial = new FilesController(adapterWithOnlyURL, null, { preserveFileName: true });
@@ -289,7 +289,7 @@ describe('FilesController', () => {
289289
);
290290

291291
expect(result.name).toBe('originalFile.txt');
292-
expect(result.url).toBe('http://new.url/partialFile.txt');
292+
expect(result.url).toBe('http://example.com/partialFile.txt');
293293
});
294294

295295
it('should use adapter filename and generate url when adapter returns only filename', async () => {
@@ -301,7 +301,7 @@ describe('FilesController', () => {
301301
});
302302
};
303303
adapterWithOnlyFilename.getFileLocation = (config, filename) => {
304-
return Promise.resolve(`http://default.url/${filename}`);
304+
return Promise.resolve(`http://example.com/${filename}`);
305305
};
306306

307307
const controllerWithOnlyFilename = new FilesController(adapterWithOnlyFilename, null, { preserveFileName: true });
@@ -314,6 +314,6 @@ describe('FilesController', () => {
314314
);
315315

316316
expect(result.name).toBe('newname.txt');
317-
expect(result.url).toBe('http://default.url/newname.txt');
317+
expect(result.url).toBe('http://example.com/newname.txt');
318318
});
319319
});

0 commit comments

Comments
 (0)