forked from github/wulkanowy-mirror
Add support for reversed student name mailbox matching (#2051)
* Add support for reversed student name mailbox matching * Add additional log stmt to mailbox matching in all mailbox load * Revert changes in mapper
This commit is contained in:
parent
6c115fb915
commit
b160367744
3 changed files with 23 additions and 1 deletions
|
@ -64,6 +64,18 @@ class GetMailboxByStudentUseCaseTest {
|
|||
assertEquals(expectedMailbox, selectedMailbox)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `get mailbox for user with reversed name`() = runTest {
|
||||
val student = getStudentEntity(
|
||||
userName = "Kowalski Jan",
|
||||
studentName = "Jan Kowalski",
|
||||
)
|
||||
val expectedMailbox = getMailboxEntity("Kowalski Jan")
|
||||
coEvery { mailboxDao.loadAll(any()) } returns listOf(expectedMailbox)
|
||||
|
||||
assertEquals(expectedMailbox, systemUnderTest(student))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `get mailbox for unique non-authorized student`() = runTest {
|
||||
val student = getStudentEntity(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue