mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
parent
0005d763af
commit
297d853ddb
6 changed files with 19 additions and 19 deletions
|
@ -17,15 +17,15 @@ describe("Ghostdown showdown extensions", function () {
|
||||||
|
|
||||||
it("should export an array of methods for processing", function () {
|
it("should export an array of methods for processing", function () {
|
||||||
|
|
||||||
ghostdown.should.be.a("function");
|
ghostdown.should.be.a.function;
|
||||||
ghostdown().should.be.an.instanceof(Array);
|
ghostdown().should.be.an.instanceof(Array);
|
||||||
|
|
||||||
ghostdown().forEach(function (processor) {
|
ghostdown().forEach(function (processor) {
|
||||||
processor.should.be.a("object");
|
processor.should.be.an.Object;
|
||||||
processor.should.have.property("type");
|
processor.should.have.property("type");
|
||||||
processor.should.have.property("filter");
|
processor.should.have.property("filter");
|
||||||
processor.type.should.be.a("string");
|
processor.type.should.be.a.String;
|
||||||
processor.filter.should.be.a("function");
|
processor.filter.should.be.a.function;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ describe("Mail", function () {
|
||||||
should.exist(ghost.mail);
|
should.exist(ghost.mail);
|
||||||
ghost.mail.should.have.property('init');
|
ghost.mail.should.have.property('init');
|
||||||
ghost.mail.should.have.property('transport');
|
ghost.mail.should.have.property('transport');
|
||||||
ghost.mail.should.have.property('send').and.be.a('function');
|
ghost.mail.should.have.property('send').and.be.a.function;
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should setup SMTP transport on initialization', function (done) {
|
it('should setup SMTP transport on initialization', function (done) {
|
||||||
|
@ -84,7 +84,7 @@ describe("Mail", function () {
|
||||||
ghost.mail.init(ghost).then(function(){
|
ghost.mail.init(ghost).then(function(){
|
||||||
ghost.mail.should.have.property('transport');
|
ghost.mail.should.have.property('transport');
|
||||||
ghost.mail.transport.transportType.should.eql('SMTP');
|
ghost.mail.transport.transportType.should.eql('SMTP');
|
||||||
ghost.mail.transport.sendMail.should.be.a('function');
|
ghost.mail.transport.sendMail.should.be.a.function;
|
||||||
done();
|
done();
|
||||||
}).then(null, done);
|
}).then(null, done);
|
||||||
});
|
});
|
||||||
|
@ -94,7 +94,7 @@ describe("Mail", function () {
|
||||||
ghost.mail.init(ghost).then(function(){
|
ghost.mail.init(ghost).then(function(){
|
||||||
ghost.mail.should.have.property('transport');
|
ghost.mail.should.have.property('transport');
|
||||||
ghost.mail.transport.transportType.should.eql('SENDMAIL');
|
ghost.mail.transport.transportType.should.eql('SENDMAIL');
|
||||||
ghost.mail.transport.sendMail.should.be.a('function');
|
ghost.mail.transport.sendMail.should.be.a.function;
|
||||||
done();
|
done();
|
||||||
}).then(null, done);
|
}).then(null, done);
|
||||||
});
|
});
|
||||||
|
|
|
@ -73,8 +73,8 @@ describe('Post Model', function () {
|
||||||
results.length.should.be.above(0);
|
results.length.should.be.above(0);
|
||||||
firstPost = results.models[0].toJSON();
|
firstPost = results.models[0].toJSON();
|
||||||
|
|
||||||
firstPost.author.should.be.a('object');
|
firstPost.author.should.be.an.Object;
|
||||||
firstPost.user.should.be.a('object');
|
firstPost.user.should.be.an.Object;
|
||||||
firstPost.author.name.should.equal(DataGenerator.Content.users[0].name);
|
firstPost.author.name.should.equal(DataGenerator.Content.users[0].name);
|
||||||
firstPost.user.name.should.equal(DataGenerator.Content.users[0].name);
|
firstPost.user.name.should.equal(DataGenerator.Content.users[0].name);
|
||||||
|
|
||||||
|
@ -89,8 +89,8 @@ describe('Post Model', function () {
|
||||||
should.exist(result);
|
should.exist(result);
|
||||||
firstPost = result.toJSON();
|
firstPost = result.toJSON();
|
||||||
|
|
||||||
firstPost.author.should.be.a('object');
|
firstPost.author.should.be.an.Object;
|
||||||
firstPost.user.should.be.a('object');
|
firstPost.user.should.be.an.Object;
|
||||||
firstPost.author.name.should.equal(testUtils.DataGenerator.Content.users[0].name);
|
firstPost.author.name.should.equal(testUtils.DataGenerator.Content.users[0].name);
|
||||||
firstPost.user.name.should.equal(testUtils.DataGenerator.Content.users[0].name);
|
firstPost.user.name.should.equal(testUtils.DataGenerator.Content.users[0].name);
|
||||||
|
|
||||||
|
|
|
@ -83,7 +83,7 @@ describe('Tag Model', function () {
|
||||||
}).then(function () {
|
}).then(function () {
|
||||||
return PostModel.read({id: createdPostID, status: 'all'}, { withRelated: ['tags']});
|
return PostModel.read({id: createdPostID, status: 'all'}, { withRelated: ['tags']});
|
||||||
}).then(function (postWithoutTag) {
|
}).then(function (postWithoutTag) {
|
||||||
postWithoutTag.related('tags').should.be.empty;
|
postWithoutTag.related('tags').length.should.equal(0);
|
||||||
done();
|
done();
|
||||||
}).then(null, done);
|
}).then(null, done);
|
||||||
});
|
});
|
||||||
|
|
|
@ -30,13 +30,13 @@ function _ConvertPhrase(testPhrase) {
|
||||||
describe("Github showdown extensions", function () {
|
describe("Github showdown extensions", function () {
|
||||||
|
|
||||||
it("should export an array of methods for processing", function () {
|
it("should export an array of methods for processing", function () {
|
||||||
github.should.be.a("function");
|
github.should.be.a.function;
|
||||||
github().should.be.an.instanceof(Array);
|
github().should.be.an.Array;
|
||||||
|
|
||||||
github().forEach(function (processor) {
|
github().forEach(function (processor) {
|
||||||
processor.should.be.a("object");
|
processor.should.be.an.Object;
|
||||||
processor.should.have.property("type");
|
processor.should.have.property("type");
|
||||||
processor.type.should.be.a("string");
|
processor.type.should.be.a.String;
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -72,7 +72,7 @@
|
||||||
"grunt-open": "~0.2.2",
|
"grunt-open": "~0.2.2",
|
||||||
"matchdep": "~0.1.2",
|
"matchdep": "~0.1.2",
|
||||||
"sinon": "~1.7.3",
|
"sinon": "~1.7.3",
|
||||||
"should": "~1.2.2",
|
"should": "~2.0.2",
|
||||||
"mocha": "~1.12.0"
|
"mocha": "~1.12.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue