2018-06-02 21:48:23 +02:00
|
|
|
const should = require('should');
|
2018-05-04 15:59:39 +02:00
|
|
|
const card = require('../../../../../server/lib/mobiledoc/cards/hr');
|
|
|
|
const SimpleDom = require('simple-dom');
|
|
|
|
const serializer = new SimpleDom.HTMLSerializer(SimpleDom.voidMap);
|
2017-03-14 19:07:33 +01:00
|
|
|
|
|
|
|
describe('HR card', function () {
|
|
|
|
it('generates a horizontal rule', function () {
|
2018-05-04 15:59:39 +02:00
|
|
|
let opts = {
|
2017-03-14 19:07:33 +01:00
|
|
|
env: {
|
|
|
|
dom: new SimpleDom.Document()
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2018-05-04 15:59:39 +02:00
|
|
|
serializer.serialize(card.render(opts)).should.match('<hr>');
|
2017-03-14 19:07:33 +01:00
|
|
|
});
|
|
|
|
});
|