Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Avatar for KuCalc : devops.
Download
50663 views
1
/*
2
* resourceful-test.js: Tests for flatiron app(s) using the resourceful plugin
3
*
4
* (C) 2011, Nodejitsu Inc.
5
* MIT LICENSE
6
*
7
*/
8
9
var assert = require('assert'),
10
resourceful = require('resourceful'),
11
vows = require('vows');
12
13
var app = require('../../examples/resourceful-app/app');
14
15
vows.describe('flatiron/plugins/resourceful').addBatch({
16
"A flatiron app using `flatiron.plugins.resourceful": {
17
topic: app,
18
"should extend the app correctly": function (app) {
19
assert.isObject(app.resources);
20
assert.isFunction(app.resources.Creature);
21
assert.isFunction(app.define);
22
},
23
"when initialized": {
24
topic: function () {
25
app.init(this.callback);
26
},
27
"it should use the correct engine": function () {
28
assert.equal(app.resources.Creature.engine, resourceful.engines.Memory);
29
}
30
}
31
}
32
}).export(module);
33