Show
Ignore:
Timestamp:
08/18/07 19:34:16 (17 months ago)
Author:
uriel
Message:

added a count class-method to get the count of rows in SQL rather than doing it in JavaScript?.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • GearsORM/trunk/tests/test_simple.html

    r319 r323  
    4949                                        UnitTest.assertTrue(fromDb.firstName == "updated","someone wasn`t updated"); 
    5050                                }, 
     51                                "test if count works":function() 
     52                                { 
     53                                        UnitTest.assertEqual(1,Person.count()); 
     54                                        new Person({firstName:"test",lastName:"test"}).save(); 
     55                                        UnitTest.assertEqual(2,Person.count()); 
     56                                        UnitTest.assertEqual(1,Person.count("firstName = ?",["test"])); 
     57                                }, 
    5158                                "test if delete works":function() 
    5259                                {