DatabaseComponent.setSeen() should call setStatusSeenIfVisible().

Otherwise an exception may be thrown if an offered message is no
longer in the DB.
This commit is contained in:
akwizgran
2011-09-25 14:39:31 +01:00
parent 98ab523092
commit 124188a0a1
2 changed files with 2 additions and 2 deletions

View File

@@ -1509,7 +1509,7 @@ public abstract class DatabaseComponentTest extends TestCase {
allowing(database).containsContact(txn, contactId);
will(returnValue(true));
// setSeen(contactId, Collections.singleton(messageId))
oneOf(database).setStatus(txn, contactId, messageId, Status.SEEN);
oneOf(database).setStatusSeenIfVisible(txn, contactId, messageId);
}});
DatabaseComponent db = createDatabaseComponent(database, cleaner);