Fix the build.
This commit is contained in:
parent
41b0fbe001
commit
2b7fb43d84
|
@ -15,11 +15,7 @@ export default Ember.Component.extend({
|
|||
|
||||
@computed("model.is_group_user")
|
||||
userIsGroupUser(isGroupUser) {
|
||||
if (isGroupUser !== undefined) {
|
||||
return isGroupUser;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return !!isGroupUser;
|
||||
},
|
||||
|
||||
_showLoginModal() {
|
||||
|
|
|
@ -61,22 +61,7 @@ QUnit.test('userIsGroupUser', function(assert) {
|
|||
|
||||
assert.equal(this.subject().get('userIsGroupUser'), false);
|
||||
|
||||
this.subject().setProperties({ model: { id: 1 }, groupUserIds: [1] });
|
||||
|
||||
assert.equal(this.subject().get('userIsGroupUser'), true);
|
||||
|
||||
this.subject().set('groupUserIds', [3]);
|
||||
|
||||
assert.equal(this.subject().get('userIsGroupUser'), false);
|
||||
|
||||
this.subject().set('groupUserIds', undefined);
|
||||
|
||||
assert.equal(this.subject().get('userIsGroupUser'), false);
|
||||
|
||||
this.subject().setProperties({
|
||||
groupUserIds: [1, 3],
|
||||
model: { id: 1, is_group_user: false }
|
||||
});
|
||||
this.subject().set('model.is_group_user', null);
|
||||
|
||||
assert.equal(this.subject().get('userIsGroupUser'), false);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue