mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 15:36:16 -04:00
tests: Always run the import unsupported file type test
This commit is contained in:
parent
2f17849b7b
commit
9a6f286441
1 changed files with 13 additions and 4 deletions
|
@ -75,6 +75,18 @@ describe('Imports and Exports', function(){
|
|||
}
|
||||
});
|
||||
|
||||
const backups = {};
|
||||
|
||||
beforeEach(async function() {
|
||||
// Note: This is a shallow copy.
|
||||
backups.settings = Object.assign({}, settings);
|
||||
});
|
||||
|
||||
afterEach(async function() {
|
||||
// Note: This does not unset settings that were added.
|
||||
Object.assign(settings, backups.settings);
|
||||
});
|
||||
|
||||
it('creates a new Pad, imports content to it, checks that content', async function() {
|
||||
await agent.get(endPoint('createPad') + `&padID=${testPadId}`)
|
||||
.expect(200)
|
||||
|
@ -210,10 +222,7 @@ describe('Imports and Exports', function(){
|
|||
});
|
||||
|
||||
it('Tries to import unsupported file type', async function() {
|
||||
if (settings.allowUnknownFileEnds === true) {
|
||||
console.log('skipping test because allowUnknownFileEnds is true');
|
||||
return this.skip();
|
||||
}
|
||||
settings.allowUnknownFileEnds = false;
|
||||
await agent.post(`/p/${testPadId}/import`)
|
||||
.attach('file', padText, {filename: '/test.xasdasdxx', contentType: 'weirdness/jobby'})
|
||||
.expect(200)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue