Skip to content

Commit

Permalink
Uses ember generator for tests and fix ember-cli
Browse files Browse the repository at this point in the history
Ember-cli was previously broken (invalid JSON because extra `,`).
Fixed the cli, then recreated the adapter, serializer, and service
using ember generator, because they didn't have tests.
  • Loading branch information
payne-chris-r committed Mar 8, 2017
1 parent d988da5 commit 738b697
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .ember-cli
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
Setting `disableAnalytics` to true will prevent any data from being sent.
*/
"disableAnalytics": true,
"port": 7165, // +('GA'.split('').reduce((p, c)=> p + c.charCodeAt(), ''));
"port": 7165 // +('GA'.split('').reduce((p, c)=> p + c.charCodeAt(), ''));
}
4 changes: 4 additions & 0 deletions app/services/auth.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import Ember from 'ember';

export default Ember.Service.extend({
});
12 changes: 12 additions & 0 deletions tests/unit/adapters/application-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
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);
});
15 changes: 15 additions & 0 deletions tests/unit/serializers/application-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { moduleForModel, test } from 'ember-qunit';

moduleForModel('application', 'Unit | Serializer | application', {
// Specify the other units that are required for this test.
needs: ['serializer:application']
});

// Replace this with your real tests.
test('it serializes records', function(assert) {
let record = this.subject();

let serializedRecord = record.serialize();

assert.ok(serializedRecord);
});
12 changes: 12 additions & 0 deletions tests/unit/services/auth-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { moduleFor, test } from 'ember-qunit';

moduleFor('service:auth', 'Unit | Service | auth', {
// Specify the other units that are required for this test.
// needs: ['service:foo']
});

// Replace this with your real tests.
test('it exists', function(assert) {
let service = this.subject();
assert.ok(service);
});

0 comments on commit 738b697

Please sign in to comment.