Bugfix: Fix another attachable bug related to collections and multiple inputs (like 1882eff).

With unit tests that would have prevented both bugs.
This commit is contained in:
John Chilton
2014-05-27 12:52:41 -05:00
parent 430fbc6bf5
commit b8de16eff2
2 changed files with 21 additions and 0 deletions
+18
View File
@@ -917,6 +917,24 @@ define([
this.verifyNotAttachable( inputTerminal1, "list:paired" );
} );
test( "unconnected multiple inputs can be connected to rank 1 collections", function() {
var inputTerminal1 = this.newInputTerminal( null, { multiple: true } );
this.verifyAttachable( inputTerminal1, "list" );
} );
test( "connected multiple input cannot be connected to collections", function() {
var inputTerminal1 = this.newInputTerminal( null, { multiple: true } );
var connectedInput1 = this.addConnectedInput( inputTerminal1 );
this.addConnectedOutput( connectedInput1 );
// Normally could do this reduction, but cannot because input already connected.
this.verifyNotAttachable( connectedInput1, "list" );
} );
test( "unconnected multiple inputs cannot be connected to rank > 1 collections (yet...)", function() {
var inputTerminal1 = this.newInputTerminal( null, { multiple: true } );
this.verifyNotAttachable( inputTerminal1, "list:paired" );
} );
test( "resetMappingIfNeeded does nothing if not mapped", function() {
var inputTerminal1 = this.newInputTerminal();
inputTerminal1.resetMappingIfNeeded();