mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-11 08:43:02 +00:00
Implement export for 3rd Party sites
This commit is contained in:
@@ -10,7 +10,6 @@ describe("Serializer Service", function() {
|
||||
|
||||
describe("Detailed Export", function() {
|
||||
var code = '48A6A6A5A8A8A5C2c0o0o0o1m1m0q0q0404-0l0b0100034k5n052d04--0303326b.AwRj4yo5dig=.MwBhEYy6duwEziA',
|
||||
url = 'http://a.test.url.com',
|
||||
anaconda = DB.ships['anaconda'],
|
||||
testBuild,
|
||||
exportData;
|
||||
@@ -18,22 +17,22 @@ describe("Serializer Service", function() {
|
||||
beforeEach(function() {
|
||||
testBuild = new Ship('anaconda', anaconda.properties, anaconda.slots);
|
||||
Serializer.toShip(testBuild, code);
|
||||
exportData = Serializer.toJsonBuild('Test Build', testBuild, url, code);
|
||||
exportData = Serializer.toDetailedBuild('Test', testBuild, code);
|
||||
});
|
||||
|
||||
it("conforms to the ship-loadout schema", function() {
|
||||
var shipLoadoutSchema = __json__['/schemas/ship-loadout/1-draft'];
|
||||
var shipLoadoutSchema = __json__['schemas/ship-loadout/1'];
|
||||
var validate = jsen(shipLoadoutSchema);
|
||||
var valid = validate(exportData);
|
||||
expect(valid).toBeTruthy();
|
||||
});
|
||||
|
||||
xit("contains the correct components", function() {
|
||||
// TODO: implement
|
||||
});
|
||||
|
||||
xit("contains the correct stats", function() {
|
||||
// TODO: implement
|
||||
it("contains the correct components and stats", function() {
|
||||
var anacondaTestExport = __json__['fixtures/anaconda-test-detailed-export'];
|
||||
expect(exportData.components).toEqual(anacondaTestExport.components);
|
||||
expect(exportData.stats).toEqual(anacondaTestExport.stats);
|
||||
expect(exportData.ship).toEqual(anacondaTestExport.ship);
|
||||
expect(exportData.name).toEqual(anacondaTestExport.name);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user