Skip to content

Commit

Permalink
ensure test doesnt fail by 1 second diff in timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
ceeram committed Nov 22, 2011
1 parent f68d0f9 commit 7d6637f
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -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';
Expand All @@ -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();
Expand Down

0 comments on commit 7d6637f

Please sign in to comment.