Sha256: 8be4fe692e8cf07f9221c2e7b27fb3f90020f6c31ba1329d24db5985d99c9a84

Contents?: true

Size: 534 Bytes

Versions: 5

Compression:

Stored size: 534 Bytes

Contents

module('controls');

var controls = re.e('controls');

test('addArrow', function(){
  
  var old = re('arrow').length;
  
  //should call addarrow
  expectCall(controls, 'addArrow');
  
  //press space
  keypress('space');
  
  //check that a new arrow was created
  equal(re('arrow').length, old+1);
  
});

test('removeArrow', function(){
  
  var old = re('arrow').length;
  
  expectCall(controls, 'removeArrow');
  
  //press r
  keypress('r');
  
  //check that a new arrow was removed
  equal(re('arrow').length, old-1);
  
});

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
entityjs-0.4.1 templates/arrow_keys/tests/inputs/controls_test.js
entityjs-0.4.0 templates/arrow_keys/tests/inputs/controls_test.js
entityjs-0.3.2 templates/arrow_keys/tests/inputs/controls_test.js
entityjs-0.3.1 templates/arrow_keys/tests/input/controls_test.js
entityjs-0.3.0 templates/arrow_keys/tests/input/controls_test.js