blob: 8ee50b6cceba972cced3e9aa81136514c9283087 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
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');
});
});
});
|