diff --git a/platform/commonUI/browse/src/creation/CreationPolicy.js b/platform/commonUI/browse/src/creation/CreationPolicy.js index a30a78ab8b..0ccf82d907 100644 --- a/platform/commonUI/browse/src/creation/CreationPolicy.js +++ b/platform/commonUI/browse/src/creation/CreationPolicy.js @@ -38,7 +38,7 @@ define( * Only allow creation of object types that have the * Creation capability */ - allow: function (action, type) { + allow: function (type) { return type.hasFeature("creation"); } }; diff --git a/platform/commonUI/browse/test/creation/CreationPolicySpec.js b/platform/commonUI/browse/test/creation/CreationPolicySpec.js index 41afee0875..1f88c1b149 100644 --- a/platform/commonUI/browse/test/creation/CreationPolicySpec.js +++ b/platform/commonUI/browse/test/creation/CreationPolicySpec.js @@ -27,8 +27,7 @@ define( "use strict"; describe("The creation policy", function () { - var mockDomainObject, - mockType, + var mockType, policy; beforeEach(function () { @@ -42,12 +41,12 @@ define( it("allows creation of types with the creation feature", function () { mockType.hasFeature.andReturn(true); - expect(policy.allow({}, mockType)).toBeTruthy(); + expect(policy.allow(mockType)).toBeTruthy(); }); it("disallows creation of types without the creation feature", function () { mockType.hasFeature.andReturn(false); - expect(policy.allow({}, mockType)).toBeFalsy(); + expect(policy.allow(mockType)).toBeFalsy(); }); }); }