Skip to content

Commit

Permalink
Remove blueprints from event descriptor spec
Browse files Browse the repository at this point in the history
  • Loading branch information
cdebost committed Sep 6, 2017
1 parent 5ddfc42 commit df506b3
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions test/spec/meta/event-descriptor-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ describe("meta/event-descriptor-spec", function () {

describe("EventDescriptor", function () {

var blueprint, eventDescriptor;
var objectDescriptor, eventDescriptor;
beforeEach(function () {
blueprint = new ObjectDescriptor().initWithName("testObjectDescriptor");
eventDescriptor = new EventDescriptor().initWithNameAndObjectDescriptor("event", blueprint);
objectDescriptor = new ObjectDescriptor().initWithName("testObjectDescriptor");
eventDescriptor = new EventDescriptor().initWithNameAndObjectDescriptor("event", objectDescriptor);
});

it("has the correct name", function () {
Expand All @@ -36,19 +36,9 @@ describe("meta/event-descriptor-spec", function () {
});

describe("serialization", function () {
var serializer, blueprintSerialization, objectDescriptorSerialization;
var serializer, objectDescriptorSerialization;

beforeEach(function () {
blueprintSerialization = {
"root": {
"prototype": "montage/core/meta/event-blueprint",
"values": {
"name": "event",
"blueprint": {"@": "blueprint_testblueprint"}
}
},
"blueprint_testblueprint": {}
};
objectDescriptorSerialization = {
"root": {
"prototype": "montage/core/meta/event-descriptor",
Expand All @@ -75,8 +65,8 @@ describe("meta/event-descriptor-spec", function () {
});

xit("should deserialize correctly", function (done) {
var deserializer = new Deserializer().init(JSON.stringify(blueprintSerialization), require);
deserializer.deserializeObject({blueprint_testblueprint: blueprint}).then(function (deserialized) {
var deserializer = new Deserializer().init(JSON.stringify(objectDescriptorSerialization), require);
deserializer.deserializeObject({objectDescriptor_testobjectdescriptor: objectDescriptor}).then(function (deserialized) {
expect(deserialized).toEqual(eventDescriptor);
}).finally(function () {
done();
Expand Down

0 comments on commit df506b3

Please sign in to comment.