Commit a60672d1 authored by Bertrand PINEL's avatar Bertrand PINEL

First introduction of Ember Data without back API. not working...

parent e581c638
import DS from 'ember-data';
export default DS.JSONAPIAdapter.extend({
namespace: 'api'
});
import DS from 'ember-data';
export default DS.Model.extend({
});
import Ember from 'ember';
let racks = [
{
name: 'Standard grey Rack',
nbColumns: 6,
nbRows: 4,
image: './img/rack_01.jpg'
},
{
name: 'Traditional big Rack',
nbColumns: 10,
nbRows: 10,
image: './img/rack_02.jpg'
},
{
name: 'Small Wood Rack',
nbColumns: 3,
nbRows: 4,
image: './img/rack_03.jpg'
}
];
export default Ember.Route.extend({
model() {
return racks;
}
return this.store.findAll('rack');
}
});
import { moduleFor, test } from 'ember-qunit';
moduleFor('adapter:application', 'Unit | Adapter | application', {
// Specify the other units that are required for this test.
// needs: ['serializer:foo']
});
// Replace this with your real tests.
test('it exists', function(assert) {
let adapter = this.subject();
assert.ok(adapter);
});
import { moduleForModel, test } from 'ember-qunit';
moduleForModel('rack', 'Unit | Model | rack', {
// Specify the other units that are required for this test.
needs: []
});
test('it exists', function(assert) {
let model = this.subject();
// let store = this.store();
assert.ok(!!model);
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment