Add tests for our store

This commit is contained in:
Robin Ward
2015-03-06 12:37:24 -05:00
parent ea1cd8dcd4
commit ecb553af3f
4 changed files with 82 additions and 2 deletions

View File

@ -0,0 +1,19 @@
import Store from "discourse/models/store";
import RestAdapter from 'discourse/adapters/rest';
let _restAdapter;
export default function() {
return Store.create({
container: {
lookup(type) {
if (type === "adapter:rest") {
_restAdapter = _restAdapter || RestAdapter.create({ container: this });
return (_restAdapter);
}
},
lookupFactory: function() { }
}
});
}