Permalink
Browse files

ensure test doesnt fail by 1 second diff in timestamp

  • Loading branch information...
ceeram committed Nov 22, 2011
1 parent f68d0f9 commit 7d6637f55b77ffb040d505e5c96de5e7a857b3d4
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/Cake/Test/Case/Controller/Component/Auth/FormAuthenticateTest.php
@@ -163,6 +163,7 @@ public function testPluginModel() {
), true);
CakePlugin::load('TestPlugin');
+ $ts = date('Y-m-d H:i:s');
$PluginModel = ClassRegistry::init('TestPlugin.TestPluginAuthUser');
$user['id'] = 1;
$user['username'] = 'gwoo';
@@ -184,7 +185,7 @@ public function testPluginModel() {
'username' => 'gwoo',
'created' => '2007-03-17 01:16:23'
);
- $this->assertTrue($result['updated'] >= date('Y-m-d H:i:s'));
+ $this->assertTrue($result['updated'] >= $ts);
unset($result['updated']);
$this->assertEquals($expected, $result);
CakePlugin::unload();

0 comments on commit 7d6637f

Please sign in to comment.