From 6618ac6801ebb2db7ddc5fe8b51d8aa67c6b0baa Mon Sep 17 00:00:00 2001 From: Lucas Dohmen Date: Mon, 16 Sep 2013 15:42:03 +0200 Subject: [PATCH] Foxx Repository: Also check the returned object of byId --- js/common/tests/shell-foxx-repository.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/common/tests/shell-foxx-repository.js b/js/common/tests/shell-foxx-repository.js index 560ec027f6..18d9c9298d 100644 --- a/js/common/tests/shell-foxx-repository.js +++ b/js/common/tests/shell-foxx-repository.js @@ -161,7 +161,7 @@ function RepositoryMethodsSpec() { collection.assertIsSatisfied(); }, - testByIdReturnValue: function () { + testByIdConstructsModelAndReturnsIt: function () { allow(collection) .toReceive("document") .andReturn(data); @@ -171,6 +171,7 @@ function RepositoryMethodsSpec() { model = instance.byId(id); + assertTrue(model instanceof ModelPrototype); ModelPrototype.assertIsSatisfied(); } };