[Common UI] Amend ActionGroupControllerSpec
Amend ActionGroupControllerSpec (introduced for WTD-574, transition of common UI elements) such that it handles the case where no action capability is defined.
This commit is contained in:
@@ -63,6 +63,14 @@ define(
|
|||||||
expect(mockScope.groups[1].length).toEqual(2); // b
|
expect(mockScope.groups[1].length).toEqual(2); // b
|
||||||
expect(mockScope.ungrouped.length).toEqual(3); // ungrouped
|
expect(mockScope.ungrouped.length).toEqual(3); // ungrouped
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("provides empty arrays when no action capability is available", function () {
|
||||||
|
// Call the watch
|
||||||
|
mockScope.$watch.mostRecentCall.args[1]();
|
||||||
|
|
||||||
|
expect(mockScope.groups.length).toEqual(0);
|
||||||
|
expect(mockScope.ungrouped.length).toEqual(0);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
Reference in New Issue
Block a user