Index: Tools/GardeningServer/ui/test/ct-last-updated-tests.html |
diff --git a/Tools/GardeningServer/ui/test/ct-last-updated-tests.html b/Tools/GardeningServer/ui/test/ct-last-updated-tests.html |
index 8f56d90d5b0b53f77802d4642063cab0d929336a..ff874359e681e573934157bd2b7ba651fcdb231b 100644 |
--- a/Tools/GardeningServer/ui/test/ct-last-updated-tests.html |
+++ b/Tools/GardeningServer/ui/test/ct-last-updated-tests.html |
@@ -24,7 +24,7 @@ describe('ct-last-updated', function() { |
it('should have correct text', function() { |
var expected = 'Updated 5 min ago @ ' + lastUpdated.date.getHours() + ':' + |
- lastUpdated.date.getMinutes(); |
+ lastUpdated.date.getMinutes().toString().padLeft(2, '0'); |
assert.include(lastUpdated.shadowRoot.innerHTML.trim(), expected); |
}); |
}); |
@@ -43,7 +43,6 @@ describe('ct-last-updated', function() { |
describe('Pad minutes when less than 10', function() { |
beforeEach(function(done) { |
lastUpdated = document.createElement('ct-last-updated'); |
- // Set the date to 5 minutes ago. |
lastUpdated.date = Date.create('11:05'); |
requestAnimationFrame(function() { done(); }); |
}); |
@@ -54,6 +53,20 @@ describe('ct-last-updated', function() { |
}); |
}); |
+ describe('Pad minutes when greater than 10', function() { |
+ beforeEach(function(done) { |
+ lastUpdated = document.createElement('ct-last-updated'); |
+ lastUpdated.date = Date.create('11:25'); |
+ requestAnimationFrame(function() { done(); }); |
+ }); |
+ |
+ it('should have correct text', function() { |
+ var expected = '11:25'; |
+ assert.include(lastUpdated.shadowRoot.innerHTML.trim(), expected); |
+ }); |
+ }); |
+ |
+ |
}); |
})() |