[Core] Add spec for StaticModelProvider

Add spec for StaticModelProvider to increase coverage
in platform/core, for WTD-573.
This commit is contained in:
Victor Woeltjen
2014-11-21 11:52:14 -08:00
parent 9b52843e3f
commit 41ecb1f8c2
4 changed files with 70 additions and 4 deletions

View File

@ -4,7 +4,7 @@
* Module defining RootModelProvider. Created by vwoeltje on 11/7/14.
*/
define(
['./StaticModelProvider.js'],
['./StaticModelProvider'],
function (StaticModelProvider) {
"use strict";

View File

@ -12,7 +12,7 @@ define(
* Loads static models, provided as declared extensions of bundles.
* @constructor
*/
function StaticModelProvider(models, $log) {
function StaticModelProvider(models, $q, $log) {
var modelMap = {};
function addModelToMap(model) {
@ -54,7 +54,7 @@ define(
ids.forEach(function (id) {
result[id] = modelMap[id];
});
return Promise.resolve(result);
return $q.when(result);
}
};
}