Commit 34f6950f authored by Robert Knight's avatar Robert Knight

Eliminate extra reference to Annotation domain object

As a step towards making <annotation> stateless or nearly-stateless and
instead just a display of an annotation derived from the current
annotation instance and its draft, remove the `domainModel` copy of
`vm.annotation`.
parent e25710c9
This diff is collapsed.
......@@ -1154,16 +1154,14 @@ describe('annotation', function() {
});
it('reverts to the most recently saved version', function () {
fakeStore.annotation.update = function (params, ann) {
return Promise.resolve(Object.assign({}, ann));
};
var controller = createDirective({
id: 'new-annot',
user: 'acct:bill@localhost',
text: 'saved-text',
}).controller;
controller.edit();
controller.form.text = 'New annotation text';
return controller.save().then(function () {
controller.edit();
controller.form.text = 'Updated annotation text';
......@@ -1171,7 +1169,7 @@ describe('annotation', function() {
}).then(function () {
controller.edit();
controller.revert();
assert.equal(controller.form.text, 'Updated annotation text');
assert.equal(controller.form.text, controller.annotation.text);
});
});
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment