mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-16 15:45:13 +00:00
24 lines
667 B
JavaScript
24 lines
667 B
JavaScript
var SummaryPart = require('../summaryPart');
|
|
|
|
describe('SummaryPart', function() {
|
|
describe('createChildLevel', function() {
|
|
it('must create the right level', function() {
|
|
var article = SummaryPart.create({}, '1');
|
|
expect(article.createChildLevel()).toBe('1.1');
|
|
});
|
|
|
|
it('must create the right level when has articles', function() {
|
|
var article = SummaryPart.create({
|
|
articles: [
|
|
{
|
|
title: 'Test'
|
|
}
|
|
]
|
|
}, '1');
|
|
expect(article.createChildLevel()).toBe('1.2');
|
|
});
|
|
});
|
|
});
|
|
|
|
|