mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-19 00:11:49 +03:00
ff4d8ef903
no issue
32 lines
927 B
JavaScript
32 lines
927 B
JavaScript
// Switch these lines once there are useful utils
|
|
// const testUtils = require('./utils');
|
|
require('./utils');
|
|
|
|
const lib = require('../lib');
|
|
|
|
describe('Releases', function () {
|
|
describe('uploadZip', function () {
|
|
it('no options', function (done) {
|
|
try {
|
|
lib.releases.uploadZip();
|
|
} catch (err) {
|
|
err.message.should.eql('Missing options: zipPath, github, github.token, userAgent, uri');
|
|
return done();
|
|
}
|
|
|
|
throw new Error('should fail');
|
|
});
|
|
|
|
it('missing options', function (done) {
|
|
try {
|
|
lib.releases.uploadZip({zipPath: 'test', github: {}});
|
|
} catch (err) {
|
|
err.message.should.eql('Missing options: github.token, userAgent, uri');
|
|
return done();
|
|
}
|
|
|
|
throw new Error('should fail');
|
|
});
|
|
});
|
|
});
|