Merge branch '2012.10'
authorPhilipp Schüle <p.schuele@metaways.de>
Thu, 7 Feb 2013 08:58:00 +0000 (09:58 +0100)
committerPhilipp Schüle <p.schuele@metaways.de>
Thu, 7 Feb 2013 08:58:00 +0000 (09:58 +0100)
1  2 
tests/tine20/ActiveSync/Controller/EmailTests.php
tests/tine20/Tinebase/Record/RecordTest.php
tine20/Tinebase/Record/Abstract.php
tine20/Tinebase/js/widgets/dialog/EditDialog.js

@@@ -148,7 -145,27 +148,26 @@@ class Tinebase_Record_RecordTest extend
      }
      
      /**
+      * test if record is dirty
+      *
+      */
+     public function testIsDirty()
+     {
+         $record = new Tinebase_Record_DummyRecord(array(
+             'string' => 'test',
+             'test_1' => 25,
+             'test_2' => 99,
+             'date_single' => Tinebase_DateTime::now()->get(Tinebase_Record_Abstract::ISO8601LONG)
+         ), true);
+         
+         $this->assertFalse($record->isDirty(), 'record is not clean');
+         
+         $record->string = 'anders';
+         $this->assertTrue($record->isDirty(), 'records is not dirty');
+     }
+     
+     /**
       * test if equal
 -     *
       */
      public function testIsEqual()
      {
@@@ -227,9 -234,11 +234,11 @@@ abstract class Tinebase_Record_Abstrac
              $this->_filters['description'] = new Tinebase_Model_InputFilter_CrlfConvert();
          }
  
 -        if(is_array($_data)) {
 +        if (is_array($_data)) {
              $this->setFromArray($_data);
          }
+         
+         $this->_isDirty = false;
      }
      
      /**