You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@climate.apache.org by jo...@apache.org on 2013/06/25 00:59:18 UTC

svn commit: r1496277 - /incubator/climate/trunk/rcmet/src/main/ui/test/unit/filters/ISODateToMiddleEndianTest.js

Author: joyce
Date: Mon Jun 24 22:59:17 2013
New Revision: 1496277

URL: http://svn.apache.org/r1496277
Log:
CLIMATE-153 progress - Add whitespace test

- Add test to ensure that leading and trailing whitespace is stripped
  properly.
- Update name of tests for clarity.

Modified:
    incubator/climate/trunk/rcmet/src/main/ui/test/unit/filters/ISODateToMiddleEndianTest.js

Modified: incubator/climate/trunk/rcmet/src/main/ui/test/unit/filters/ISODateToMiddleEndianTest.js
URL: http://svn.apache.org/viewvc/incubator/climate/trunk/rcmet/src/main/ui/test/unit/filters/ISODateToMiddleEndianTest.js?rev=1496277&r1=1496276&r2=1496277&view=diff
==============================================================================
--- incubator/climate/trunk/rcmet/src/main/ui/test/unit/filters/ISODateToMiddleEndianTest.js (original)
+++ incubator/climate/trunk/rcmet/src/main/ui/test/unit/filters/ISODateToMiddleEndianTest.js Mon Jun 24 22:59:17 2013
@@ -29,18 +29,25 @@ describe('OCW Filters', function() {
 			});
 		});
 
-		it('should replace the ISO Date/Time stamp', function() {
+		it('should replace the modified ISO Date/Time stamp', function() {
 			inject(function($filter) {
 				var filter = $filter('ISODateToMiddleEndian');
 				expect(filter('2012-01-02 00:00:00')).toEqual('01/02/2012');
 			});
 		});
 
-		it('should replace the ISO Date/Time stamp', function() {
+		it('should replace the ISO Date stamp', function() {
 			inject(function($filter) {
 				var filter = $filter('ISODateToMiddleEndian');
 				expect(filter('2012-01-02')).toEqual('01/02/2012');
 			});
 		});
+
+		it('should replace leading and trailing whitespace', function() {
+			inject(function($filter) {
+				var filter = $filter('ISODateToMiddleEndian');
+				expect(filter('      2012-01-02T00:00:00    ')).toEqual('01/02/2012');
+			});
+		});
 	});
 });