diff --git a/test/attributes/attributeforinstanceof.js b/test/attributes/attributeforinstanceof.js index a50d8ca5..21962a65 100644 --- a/test/attributes/attributeforinstanceof.js +++ b/test/attributes/attributeforinstanceof.js @@ -66,6 +66,21 @@ describe("attributes/attributeforinstanceof", function () { assert(exceptionCaught instanceof gpf.Error.ClassAttributeOnly); }); + it("can't be used twice", function () { + var exceptionCaught; + try { + gpf.define({ + $class: "Attribute", + $extend: gpf.attributes.Attribute, + $attributes: [onInstanceOfA, onInstanceOfA], + test: function () {} + }); + } catch (e) { + exceptionCaught = e; + } + assert(exceptionCaught instanceof gpf.Error.UniqueAttributeUsedTwice); + }); + describe("When used properly", function () { var AttributeForA,