[Entanglement] Implement Set Primary Location

This commit is contained in:
Victor Woeltjen
2015-12-01 16:20:30 -08:00
parent 6fe3f82fb1
commit 1292e39c46
2 changed files with 65 additions and 2 deletions

View File

@@ -24,7 +24,7 @@
define(
[
'../../src/actions/SetPrimaryLocation',
'../../src/actions/SetPrimaryLocationAction',
'../DomainObjectFactory'
],
function (SetPrimaryLocation, domainObjectFactory) {
@@ -61,7 +61,10 @@ define(
it("is applicable to objects with no location specified", function () {
expect(SetPrimaryLocation.appliesTo(testContext))
.toBe(true);
testModel.location = "something";
testContext.domainObject.getModel.andReturn({
location: "something",
name: "some name"
});
expect(SetPrimaryLocation.appliesTo(testContext))
.toBe(false);
});