Sha256: 97ebdef554ed65fb82a2cf4ae9a16b03b390565ec11b1b006281e6d7ca419d5e

Contents?: true

Size: 850 Bytes

Versions: 4

Compression:

Stored size: 850 Bytes

Contents

require([
		'specs/doubles/uiobject-double', 
		'specs/doubles/mock-jamservice',
		'classes/builtin-commands'], function(){
		
		module("describe remove command spec")
		
		test("it should display success when OK result", function() {
		  	
			// arrange
			var service = new MockJamService(undefined, "OK");
			var removeCommand = new RemoveCommand(service);

		  	// act
			removeCommand.execute(["somefile"], function(output){

				equal(output, "the item was deleted");
				
			});

		});
		
		test("it should display failure when non-OK result", function() {
		  	
			// arrange
			var service = new MockJamService(undefined, "failure");
			var removeCommand = new RemoveCommand(service);

		  	// act
			removeCommand.execute(["somefile"], function(output){

				ok(output.indexOf("failed to delete the item") != -1);
				
			});
			
		});
	});

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
koda-0.0.12 public/koda/scripts/specs/remove-command-spec.js
koda-0.0.11 public/koda/scripts/specs/remove-command-spec.js
koda-0.0.9 public/koda/scripts/specs/remove-command-spec.js
koda-0.0.8 public/koda/scripts/specs/remove-command-spec.js