Session permissions issue (#1975)
* refactor: 💡 session isCancelable to isAvailable * refactor: 💡 check for target info for showing target details * refactor: 💡 add fallback for session data from connect command * refactor: 💡 remove extra divs * refactor: 💡 remove await from peekRecord of a session * test: 💍 add test for no read permission for sessions * test: 💍 reset global qunit after test is done
This commit is contained in:
1 parent
933e272764
commit
f879bbb1ec
10 files changed
+126
-69
No files matched your search
@@ -13,7 +13,7 @@ module('Unit | Model | session', function (hooks) {
|
||||
let store = this.owner.lookup('service:store');
|
||||
let model = store.createRecord('session', {});
|
||||
assert.ok(model);
|
||||
assert.notOk(model.isCancelable);
|
||||
assert.notOk(model.isAvailable);
|
||||
});
|
||||
|
||||
test('it allows cancellation of an active session', function (assert) {
|
||||
@@ -21,7 +21,7 @@ module('Unit | Model | session', function (hooks) {
|
||||
let model = store.createRecord('session', {
|
||||
status: 'active',
|
||||
});
|
||||
assert.ok(model.isCancelable);
|
||||
assert.ok(model.isAvailable);
|
||||
});
|
||||
|
||||
test('it allows cancellation of a pending session', function (assert) {
|
||||
@@ -29,7 +29,7 @@ module('Unit | Model | session', function (hooks) {
|
||||
let model = store.createRecord('session', {
|
||||
status: 'pending',
|
||||
});
|
||||
assert.ok(model.isCancelable);
|
||||
assert.ok(model.isAvailable);
|
||||
});
|
||||
|
||||
test('it computes isActive', function (assert) {
|
||||
|
||||
Reference in new issue
Block a user