Changeset 375
- Timestamp:
- 09/26/07 10:30:59 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/acts_as_versioned/lib/ActsAsVersioned.php
r368 r375 382 382 function afterUpdate(&$Object) 383 383 { 384 if(!empty($Object->versioned->_skipVersioning) ){384 if(!empty($Object->versioned->_skipVersioning) || !$Object->versioned->isDifferentFromLastVersion()){ 385 385 return true; 386 386 } plugins/acts_as_versioned/test/acts_as_versioned_tests.php
r351 r375 187 187 } 188 188 189 function test_should_not_create_new_versions_when_updating_models_without_changes() 190 { 191 $this->assertTrue($Post =& $this->Post->findFirstBy('title', 'Post 3.5')); 192 $Post->versioned->load(); 193 $expected_versions_count = count($Post->versions); 194 195 $this->assertTrue($Post =& $this->Post->findFirstBy('title', 'Post 3.5')); 196 $this->assertTrue($Post->save()); 197 $Post->versioned->load(); 198 $this->assertEqual(count($Post->versions), $expected_versions_count); 199 } 200 189 201 function test_should_drop_versioned_table() 190 202 {
