Skip to content

Commit

Permalink
review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
meirish committed May 23, 2018
1 parent b050f5f commit f317154
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
2 changes: 0 additions & 2 deletions ui/tests/acceptance/access/identity/_shared-alias-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,4 @@ export const testAliasDeleteFromForm = (name, itemType, assert) => {
assert.equal(aliasIndexPage.items.filterBy('id', aliasID).length, 0, `${itemType}: the row does not show in the list`);
aliasIndexPage.flashMessage.latestMessage.startsWith('Successfully deleted', `${itemType}: shows flash message`);
});


};
18 changes: 8 additions & 10 deletions ui/tests/unit/components/identity/edit-form-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,20 @@ let testCases = [
expected: 'vault.cluster.access.identity.aliases.show',
},
];
test('it computes cancelLink properly', function(assert) {
let component = this.subject();
let model;

testCases.forEach(testCase => {
model = Ember.Object.create({
identityType: testCase.identityType,
rollbackAttributes: sinon.spy(),
});
testCases.forEach(function(testCase) {
let model = Ember.Object.create({
identityType: testCase.identityType,
rollbackAttributes: sinon.spy(),
});
test(`it computes cancelLink properly: ${testCase.identityType} ${testCase.mode}`, function(assert) {
let component = this.subject();

component.set('mode', testCase.mode);
component.set('model', model);
assert.equal(
component.get('cancelLink'),
testCase.expected,
`${testCase.identityType} ${testCase.mode}: cancel link is correct`
'cancel link is correct'
);
});
});

0 comments on commit f317154

Please sign in to comment.