Skip to content
Snippets Groups Projects
Unverified Commit 79aafcda authored by akwizgran's avatar akwizgran
Browse files

Fixed a test, added a regression test.

parent 05af21e8
No related branches found
No related tags found
No related merge requests found
......@@ -157,6 +157,8 @@ public class BlogManagerImplTest extends BriarTestCase {
context.checking(new Expectations() {{
oneOf(blogFactory).createBlog(blog2.getAuthor());
will(returnValue(blog2));
oneOf(db).containsGroup(txn, blog2.getId());
will(returnValue(true));
oneOf(identityManager).getLocalAuthor(txn);
will(returnValue(blog1.getAuthor()));
oneOf(db).removeGroup(txn, blog2.getGroup());
......@@ -166,6 +168,25 @@ public class BlogManagerImplTest extends BriarTestCase {
context.assertIsSatisfied();
}
@Test
public void testRemovingContactAfterRemovingBlog() throws DbException {
final Transaction txn = new Transaction(null, false);
final ContactId contactId = new ContactId(0);
Contact contact = new Contact(contactId, blog2.getAuthor(),
blog1.getAuthor().getId(), true, true);
context.checking(new Expectations() {{
oneOf(blogFactory).createBlog(blog2.getAuthor());
will(returnValue(blog2));
oneOf(db).containsGroup(txn, blog2.getId());
will(returnValue(false));
}});
blogManager.removingContact(txn, contact);
context.assertIsSatisfied();
}
@Test
public void testIncomingMessage() throws DbException, FormatException {
final Transaction txn = new Transaction(null, false);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment