mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 01:02:58 +00:00
Fix XML specs
This commit is contained in:
@@ -1,21 +1,20 @@
|
||||
describe('XML', function() {
|
||||
|
||||
describe('#rep', function() {
|
||||
it('should be able to map a node to jxon', function() {
|
||||
it('converts a node to jxon', function() {
|
||||
expect(iD.format.XML.rep({ id: 'n-1', type: 'node', lat: 38, lon: -77 }))
|
||||
.toEqual({ node : { '@id': '-1', '@lat': 38, '@lon': -77, '@version': 0, tag: [ ] } });
|
||||
});
|
||||
});
|
||||
|
||||
describe('#mapping', function() {
|
||||
it('should be able to map a node to xml', function() {
|
||||
it('serializes a node to xml', function() {
|
||||
expect(iD.format.XML.mapping({ id: 'n-1', type: 'node', lat: 38, lon: -77 }))
|
||||
.toEqual('<node id="-1" lat="38" lon="-77" version="0"/>');
|
||||
.toEqual('<node id="-1" lat="38" lon="-77" version="0"/>');
|
||||
});
|
||||
it('should be able to map a way to xml', function() {
|
||||
var way = { type: 'way', nodes: [], id: 'w-1' };
|
||||
var gj = iD.format.XML.mapping(way);
|
||||
expect(gj).toEqual('<way id="-1"/>');
|
||||
|
||||
it('serializes a way to xml', function() {
|
||||
expect(iD.format.XML.mapping({ type: 'way', nodes: [], id: 'w-1' }))
|
||||
.toEqual('<way id="-1" version="0"/>');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user