Merge branch 'develop' into ICU-348-roles-crud
This commit is contained in:
3 files changed
+6
-105
No files matched your search
@@ -4,42 +4,9 @@ import { setupTest } from 'ember-qunit';
|
||||
module('Unit | Model | group', function(hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
let model;
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
test('it exists', function(assert) {
|
||||
let store = this.owner.lookup('service:store');
|
||||
model = store.createRecord('group', {});
|
||||
});
|
||||
|
||||
test('it exists', function (assert) {
|
||||
let model = store.createRecord('group', {});
|
||||
assert.ok(model);
|
||||
});
|
||||
|
||||
test('it supports name attr', function (assert) {
|
||||
model.set('name', 'Group name');
|
||||
assert.equal(model.name, 'Group name');
|
||||
});
|
||||
|
||||
test('it supports description attr', function (assert) {
|
||||
model.set('description', 'Group description');
|
||||
assert.equal(model.description, 'Group description');
|
||||
});
|
||||
|
||||
test('it supports created time attr', function (assert) {
|
||||
const createdTime = new Date();
|
||||
model.set('created_time', createdTime);
|
||||
assert.equal(model.created_time, createdTime);
|
||||
});
|
||||
|
||||
test('it supports updated time attr', function (assert) {
|
||||
const updatedTime = new Date();
|
||||
model.set('updated_time', updatedTime);
|
||||
assert.equal(model.updated_time, updatedTime);
|
||||
});
|
||||
|
||||
test('it supports disabled attr', function (assert) {
|
||||
assert.notOk(model.disabled);
|
||||
model.set('disabled', true);
|
||||
assert.ok(model.disabled);
|
||||
});
|
||||
});
|
||||
@@ -4,42 +4,9 @@ import { setupTest } from 'ember-qunit';
|
||||
module('Unit | Model | role', function (hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
let model;
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
test('it exists', function(assert) {
|
||||
let store = this.owner.lookup('service:store');
|
||||
model = store.createRecord('role', {});
|
||||
});
|
||||
|
||||
test('it exists', function (assert) {
|
||||
let model = store.createRecord('role', {});
|
||||
assert.ok(model);
|
||||
});
|
||||
|
||||
test('it supports name attr', function (assert) {
|
||||
model.set('name', 'Role name');
|
||||
assert.equal(model.name, 'Role name');
|
||||
});
|
||||
|
||||
test('it supports description attr', function (assert) {
|
||||
model.set('description', 'Role description');
|
||||
assert.equal(model.description, 'Role description');
|
||||
});
|
||||
|
||||
test('it supports created time attr', function (assert) {
|
||||
const createdTime = new Date();
|
||||
model.set('created_time', createdTime);
|
||||
assert.equal(model.created_time, createdTime);
|
||||
});
|
||||
|
||||
test('it supports updated time attr', function (assert) {
|
||||
const updatedTime = new Date();
|
||||
model.set('updated_time', updatedTime);
|
||||
assert.equal(model.updated_time, updatedTime);
|
||||
});
|
||||
|
||||
test('it supports disabled attr', function (assert) {
|
||||
assert.notOk(model.disabled);
|
||||
model.set('disabled', true);
|
||||
assert.ok(model.disabled);
|
||||
});
|
||||
});
|
||||
@@ -4,42 +4,9 @@ import { setupTest } from 'ember-qunit';
|
||||
module('Unit | Model | user', function(hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
let model;
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
test('it exists', function(assert) {
|
||||
let store = this.owner.lookup('service:store');
|
||||
model = store.createRecord('user', {});
|
||||
});
|
||||
|
||||
test('it exists', function (assert) {
|
||||
let model = store.createRecord('user', {});
|
||||
assert.ok(model);
|
||||
});
|
||||
|
||||
test('it supports name attr', function (assert) {
|
||||
model.set('name', 'User name');
|
||||
assert.equal(model.name, 'User name');
|
||||
});
|
||||
|
||||
test('it supports description attr', function (assert) {
|
||||
model.set('description', 'User description');
|
||||
assert.equal(model.description, 'User description');
|
||||
});
|
||||
|
||||
test('it supports created time attr', function (assert) {
|
||||
const createdTime = new Date();
|
||||
model.set('created_time', createdTime);
|
||||
assert.equal(model.created_time, createdTime);
|
||||
});
|
||||
|
||||
test('it supports updated time attr', function (assert) {
|
||||
const updatedTime = new Date();
|
||||
model.set('updated_time', updatedTime);
|
||||
assert.equal(model.updated_time, updatedTime);
|
||||
});
|
||||
|
||||
test('it supports disabled attr', function (assert) {
|
||||
assert.notOk(model.disabled);
|
||||
model.set('disabled', true);
|
||||
assert.ok(model.disabled);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user