Fix DB test
authorReto Buerki <reet@codelabs.ch>
Thu, 29 Mar 2012 11:46:38 +0000 (13:46 +0200)
committerReto Buerki <reet@codelabs.ch>
Thu, 29 Mar 2012 11:46:38 +0000 (13:46 +0200)
The fetchAllCommits function now returns the commits in descending order
(newest commit first).

src/ch/codelabs/gitter/test/CommitDbAdapterTest.java

index efe7086..db63756 100644 (file)
@@ -56,7 +56,7 @@ public class CommitDbAdapterTest extends AndroidTestCase {
                final Cursor c = commitDbAdapter.fetchAllCommits();
                assertTrue(c.getCount() > 0);
 
-               c.moveToLast();
+               c.moveToFirst();
                assertEquals(testHash1,
                                c.getString(c.getColumnIndexOrThrow(CommitDbAdapter.KEY_HASH)));
                assertEquals(0,