Commit 58e6b118 by Marcus Efraimsson

add some more sort order asserts for permissions store tests

parent bc8353ae
...@@ -74,6 +74,9 @@ describe('PermissionsStore', () => { ...@@ -74,6 +74,9 @@ describe('PermissionsStore', () => {
}); });
it('should be sorted by sort rank and alphabetically', async () => { it('should be sorted by sort rank and alphabetically', async () => {
expect(store.items[0].name).toBe('MyTestTeam');
expect(store.items[1].name).toBe('Editor');
expect(store.items[2].name).toBe('Viewer');
expect(store.items[3].name).toBe('MyTestTeam2'); expect(store.items[3].name).toBe('MyTestTeam2');
expect(store.items[4].name).toBe('MyTestUser'); expect(store.items[4].name).toBe('MyTestUser');
}); });
...@@ -96,5 +99,14 @@ describe('PermissionsStore', () => { ...@@ -96,5 +99,14 @@ describe('PermissionsStore', () => {
it('should add new overriding permission', () => { it('should add new overriding permission', () => {
expect(store.items.length).toBe(6); expect(store.items.length).toBe(6);
}); });
it('should be sorted by sort rank and alphabetically', async () => {
expect(store.items[0].name).toBe('MyTestTeam');
expect(store.items[1].name).toBe('Editor');
expect(store.items[2].name).toBe('Viewer');
expect(store.items[3].name).toBe('MyTestTeam');
expect(store.items[4].name).toBe('MyTestTeam2');
expect(store.items[5].name).toBe('MyTestUser');
});
}); });
}); });
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment