spec/tests/file.tests.js
author Ryan Willoughby <ryan.willoughby@nitobi.com>
Tue, 06 Jul 2010 11:31:19 -0700
changeset 0 54063d8b0412
permissions -rwxr-xr-x
initial commit of PhoneGap WRT framework, licensing and test code

Tests.prototype.FileTests = function() {	
	module('File I/O (navigator.file)');
	test("should exist", function() {
  		expect(1);
  		ok(navigator.file != null, "navigator.file should not be null.");
	});
	test("should contain a read function", function() {
		expect(2);
		ok(typeof navigator.file.read != 'undefined' && navigator.file.read != null, "navigator.file.read should not be null.");
		ok(typeof navigator.file.read == 'function', "navigator.file.read should be a function.");
	});
	test("should contain a write function", function() {
		expect(2);
		ok(typeof navigator.file.write != 'undefined' && navigator.file.write != null, "navigator.file.write should not be null.");
		ok(typeof navigator.file.write == 'function', "navigator.file.write should be a function.");
	});
};