mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 05:50:35 +03:00
Fixed regression tests
no issue - https://travis-ci.org/TryGhost/Ghost/jobs/495022683
This commit is contained in:
parent
2ab0c8e222
commit
a575f85af7
@ -111,19 +111,12 @@ describe('DB API', function () {
|
||||
});
|
||||
});
|
||||
|
||||
it('import should fail without file', function (done) {
|
||||
request.post(localUtils.API.getApiQuery('db/'))
|
||||
it('import should fail without file', function () {
|
||||
return request.post(localUtils.API.getApiQuery('db/'))
|
||||
.set('Authorization', 'Bearer ' + accesstoken)
|
||||
.set('Accept', 'application/json')
|
||||
.expect('Content-Type', /json/)
|
||||
.expect(403)
|
||||
.end(function (err) {
|
||||
if (err) {
|
||||
return done(err);
|
||||
}
|
||||
|
||||
done();
|
||||
});
|
||||
.expect(422);
|
||||
});
|
||||
|
||||
it('import should fail with unsupported file', function (done) {
|
||||
|
@ -81,19 +81,13 @@ describe('Upload Icon API', function () {
|
||||
});
|
||||
|
||||
describe('error cases for icons', function () {
|
||||
it('import should fail without file', function (done) {
|
||||
request.post(localUtils.API.getApiQuery('uploads/icon'))
|
||||
it('import should fail without file', function () {
|
||||
return request
|
||||
.post(localUtils.API.getApiQuery('uploads/icon'))
|
||||
.set('Authorization', 'Bearer ' + accesstoken)
|
||||
.set('Accept', 'application/json')
|
||||
.expect('Content-Type', /json/)
|
||||
.expect(403)
|
||||
.end(function (err) {
|
||||
if (err) {
|
||||
return done(err);
|
||||
}
|
||||
|
||||
done();
|
||||
});
|
||||
.expect(422);
|
||||
});
|
||||
|
||||
it('import should fail with unsupported file', function (done) {
|
||||
|
@ -100,19 +100,13 @@ describe('Upload API', function () {
|
||||
});
|
||||
|
||||
describe('error cases', function () {
|
||||
it('import should fail without file', function (done) {
|
||||
request.post(localUtils.API.getApiQuery('uploads'))
|
||||
it('import should fail without file', function () {
|
||||
return request
|
||||
.post(localUtils.API.getApiQuery('uploads'))
|
||||
.set('Authorization', 'Bearer ' + accesstoken)
|
||||
.set('Accept', 'application/json')
|
||||
.expect('Content-Type', /json/)
|
||||
.expect(403)
|
||||
.end(function (err) {
|
||||
if (err) {
|
||||
return done(err);
|
||||
}
|
||||
|
||||
done();
|
||||
});
|
||||
.expect(422);
|
||||
});
|
||||
|
||||
it('import should fail with unsupported file', function (done) {
|
||||
|
@ -70,7 +70,7 @@ describe('DB API', () => {
|
||||
.set('Origin', config.get('url'))
|
||||
.set('Accept', 'application/json')
|
||||
.expect('Content-Type', /json/)
|
||||
.expect(403);
|
||||
.expect(422);
|
||||
});
|
||||
|
||||
it('import should fail with unsupported file', () => {
|
||||
|
@ -28,19 +28,13 @@ describe('Upload API', function () {
|
||||
});
|
||||
});
|
||||
|
||||
it('Can\'t import fail without file', function (done) {
|
||||
request.post(localUtils.API.getApiQuery('uploads'))
|
||||
it('Can\'t import fail without file', function () {
|
||||
return request
|
||||
.post(localUtils.API.getApiQuery('uploads'))
|
||||
.set('Origin', config.get('url'))
|
||||
.set('Accept', 'application/json')
|
||||
.expect('Content-Type', /json/)
|
||||
.expect(403)
|
||||
.end(function (err) {
|
||||
if (err) {
|
||||
return done(err);
|
||||
}
|
||||
|
||||
done();
|
||||
});
|
||||
.expect(422);
|
||||
});
|
||||
|
||||
it('Can\'t import with unsupported file', function (done) {
|
||||
|
Loading…
Reference in New Issue
Block a user