mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-18 13:49:53 +01:00
Check status endpoint with contact's auth token in integration test.
This commit is contained in:
@@ -114,7 +114,23 @@ public class MailboxIntegrationTest extends BrambleTestCase {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testStatus() throws Exception {
|
public void testStatus() throws Exception {
|
||||||
|
// Owner calls status endpoint
|
||||||
assertTrue(api.checkStatus(ownerProperties));
|
assertTrue(api.checkStatus(ownerProperties));
|
||||||
|
|
||||||
|
// Owner adds contact
|
||||||
|
ContactId contactId = new ContactId(1);
|
||||||
|
MailboxContact contact = getMailboxContact(contactId);
|
||||||
|
MailboxProperties contactProperties = new MailboxProperties(
|
||||||
|
ownerProperties.getBaseUrl(), contact.token,
|
||||||
|
new ArrayList<>(), contact.inboxId, contact.outboxId);
|
||||||
|
api.addContact(ownerProperties, contact);
|
||||||
|
|
||||||
|
// Contact calls status endpoint
|
||||||
|
assertTrue(api.checkStatus(contactProperties));
|
||||||
|
|
||||||
|
// Owner deletes contact again to leave clean state for other tests
|
||||||
|
api.deleteContact(ownerProperties, contactId);
|
||||||
|
assertEquals(emptyList(), api.getContacts(ownerProperties));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
Reference in New Issue
Block a user