This commit is contained in:
@@ -14,6 +14,8 @@ import org.junit.Assert.assertEquals
|
||||
import org.junit.Assert.assertTrue
|
||||
import org.junit.Test
|
||||
import ru.daemonlord.messenger.data.chat.api.ChatApiService
|
||||
import ru.daemonlord.messenger.data.chat.dto.ChatInviteLinkDto
|
||||
import ru.daemonlord.messenger.data.chat.dto.ChatJoinByInviteRequestDto
|
||||
import ru.daemonlord.messenger.data.chat.dto.ChatReadDto
|
||||
import ru.daemonlord.messenger.data.chat.local.dao.ChatDao
|
||||
import ru.daemonlord.messenger.data.chat.local.entity.ChatEntity
|
||||
@@ -109,6 +111,14 @@ class NetworkChatRepositoryTest {
|
||||
override suspend fun getChatById(chatId: Long): ChatReadDto {
|
||||
return chats.first()
|
||||
}
|
||||
|
||||
override suspend fun createInviteLink(chatId: Long): ChatInviteLinkDto {
|
||||
return ChatInviteLinkDto(chatId = chatId, token = "token", inviteUrl = "https://chat.daemonlord.ru/invite/token")
|
||||
}
|
||||
|
||||
override suspend fun joinByInvite(request: ChatJoinByInviteRequestDto): ChatReadDto {
|
||||
return chats.first()
|
||||
}
|
||||
}
|
||||
|
||||
private class FakeChatDao(
|
||||
|
||||
Reference in New Issue
Block a user