Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d3cc63db authored by Marcus Hagerott's avatar Marcus Hagerott
Browse files

Fix logic error in GroupsDaoIntegrationTests.

Assertion was stricter then suggested by the method name.

Change-Id: I60061f813f3d59c4bf5c5bc2e1c7ad9a77ba4471
parent 1ce6ad92
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -237,11 +237,12 @@ public class GroupsDaoIntegrationTests extends InstrumentationTestCase {

    private void assertGroupWithTitleExists(String title) {
        final Cursor cursor = cr.query(ContactsContract.Groups.CONTENT_URI, null,
                ContactsContract.Groups.TITLE + "=? AND " + ContactsContract.Groups.DELETED + "=?",
                new String[] { title, "0" }, null, null);

                ContactsContract.Groups.TITLE + "=? AND " +
                        ContactsContract.Groups.DELETED + "=? AND " +
                        ContactsContract.Groups.ACCOUNT_NAME + "=?",
                new String[] { title, "0", mAccount.name }, null, null);
        try {
            assertEquals(2, cursor.getCount());
            assertTrue("No group exists with title \"" + title + "\"", cursor.getCount() > 0);
        } finally {
            cursor.close();
        }