Skip to content

Commit bf82c38

Browse files
committed
Load groups dynamically ; work in progress
1 parent 37e4075 commit bf82c38

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

app/routes/index.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import Ember from 'ember';
2+
3+
export default Ember.Route.extend({
4+
model: function() {
5+
return this.store.query('group', {
6+
'filter[id]': 1
7+
}).then((groups) => {
8+
return groups.objectAt(0);
9+
});
10+
}
11+
});

tests/unit/routes/index-test.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { moduleFor, test } from 'ember-qunit';
2+
3+
moduleFor('route:index', 'Unit | Route | index', {
4+
// Specify the other units that are required for this test.
5+
// needs: ['controller:foo']
6+
});
7+
8+
test('it exists', function(assert) {
9+
let route = this.subject();
10+
assert.ok(route);
11+
});

0 commit comments

Comments
 (0)