mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-02 08:13:34 +03:00
Add catch handlers to import tests.
Refs #3473 - Some tests are checking to make sure errors by using a catch handler on the test. When assertions fail done() is never called and results in a mocha timeout, which makes it harder to see the cause of the failure.
This commit is contained in:
parent
afa4a5299a
commit
18d12290ff
@ -652,7 +652,7 @@ describe('Import', function () {
|
||||
response[4].type.should.equal('ValidationError');
|
||||
response[4].message.should.eql('Value in [tags.name] cannot be blank.');
|
||||
done();
|
||||
});
|
||||
}).catch(done);
|
||||
});
|
||||
|
||||
it('handles database errors nicely', function (done) {
|
||||
@ -675,7 +675,7 @@ describe('Import', function () {
|
||||
'Duplicate entry found. Multiple values of "test-ghost-post" found for posts.slug.'
|
||||
);
|
||||
done();
|
||||
});
|
||||
}).catch(done);
|
||||
});
|
||||
|
||||
it('doesn\'t import invalid tags data from 003', function (done) {
|
||||
@ -701,7 +701,7 @@ describe('Import', function () {
|
||||
response[3].type.should.equal('ValidationError');
|
||||
response[3].message.should.eql('Value in [tags.slug] cannot be blank.');
|
||||
done();
|
||||
});
|
||||
}).catch(done);
|
||||
});
|
||||
|
||||
it('doesn\'t import invalid posts data from 003', function (done) {
|
||||
@ -718,7 +718,7 @@ describe('Import', function () {
|
||||
}).catch(function (response) {
|
||||
response.length.should.equal(6);
|
||||
done();
|
||||
});
|
||||
}).catch(done);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user