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 2a8238b
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 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,9 @@ describe("meta/event-descriptor-spec", function () {

describe("EventDescriptor", function () {

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

it("has the correct name", function () {
Expand All @@ -36,19 +35,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 +64,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 2a8238b

Please sign in to comment.