Add unit test: should generate simple markup for attribute with > symbol

This commit is contained in:
Jim
2015-07-09 14:26:41 -07:00
parent 75c4311a04
commit b89f7ebff4
@@ -67,6 +67,16 @@ describe('ReactServerRendering', function() {
);
});
it('should generate simple markup for attribute with `>` symbol', function() {
var response = ReactServerRendering.renderToString(
<img data-attr=">" />
);
expect(response).toMatch(
'<img data-attr="&gt;" ' + ID_ATTRIBUTE_NAME + '="[^"]+" ' +
ReactMarkupChecksum.CHECKSUM_ATTR_NAME + '="[^"]+"/>'
);
});
it('should not register event listeners', function() {
var EventPluginHub = require('EventPluginHub');
var cb = mocks.getMockFunction();