-
-
Notifications
You must be signed in to change notification settings - Fork 138
/
Copy pathprofile-test.js
26 lines (21 loc) · 905 Bytes
/
profile-test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import { setupFactoryGuy, make } from 'ember-data-factory-guy';
const modelType = 'profile';
module(`Unit | Model | ${modelType}`, function (hooks) {
setupTest(hooks);
setupFactoryGuy(hooks);
test('using only make for profile with company association', function (assert) {
let profile = make('profile', 'with_company');
assert.strictEqual(profile.get('company.profile'), profile);
});
test('composing a profile with a company association by making both', function (assert) {
let company = make('company');
let profile = make('profile', { company: company });
assert.strictEqual(profile.get('company.profile'), profile);
});
test('uses customized transformFor', function (assert) {
let profile = make('profile', { foo: 'bar' });
assert.equal(profile.get('foo'), 'bar');
});
});