mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
Don't rely on order of updates when editing multiple settings
fixes #5593
This commit is contained in:
parent
52f576e185
commit
cf4660dd46
1 changed files with 9 additions and 4 deletions
|
@ -118,10 +118,15 @@ describe('Settings Model', function () {
|
||||||
editedModel.attributes.value.should.equal(model2.value);
|
editedModel.attributes.value.should.equal(model2.value);
|
||||||
|
|
||||||
eventSpy.callCount.should.equal(4);
|
eventSpy.callCount.should.equal(4);
|
||||||
eventSpy.getCall(0).calledWith('settings.edited').should.be.true;
|
|
||||||
eventSpy.getCall(1).calledWith('settings.description.edited').should.be.true;
|
// We can't rely on the order of updates.
|
||||||
eventSpy.getCall(2).calledWith('settings.edited').should.be.true;
|
// We can however expect the first and third call to
|
||||||
eventSpy.getCall(3).calledWith('settings.title.edited').should.be.true;
|
// to be `settings.edited`.
|
||||||
|
eventSpy.firstCall.calledWith('settings.edited').should.be.true;
|
||||||
|
eventSpy.thirdCall.calledWith('settings.edited').should.be.true;
|
||||||
|
|
||||||
|
eventSpy.calledWith('settings.description.edited').should.be.true;
|
||||||
|
eventSpy.calledWith('settings.title.edited').should.be.true;
|
||||||
|
|
||||||
done();
|
done();
|
||||||
}).catch(done);
|
}).catch(done);
|
||||||
|
|
Loading…
Reference in a new issue