[Views] Add tests for type-view restrictions

Add tests for type-view restrictions added to support
stricter coupling of Packet objects to Autoflow Tabular View,
WTD-644.
This commit is contained in:
Victor Woeltjen
2015-01-07 11:53:32 -08:00
parent 65a0a92133
commit f9a4ac548c
2 changed files with 52 additions and 1 deletions

View File

@ -84,7 +84,7 @@ define(
// Check if a view and domain object type can be paired;
// both can restrict the others they accept.
function viewMatchesType(view, type) {
var views = type && type.getDefinition().views,
var views = type && (type.getDefinition() || {}).views,
matches = true;
// View is restricted to a certain type