package de.trainingstagebuch.app.utils

import org.junit.Assert.assertEquals
import org.junit.Test

class AppErrorUtilsTest {

    @Test
    fun `backendOrThrowable prefers backend message when present`() {
        val result = AppErrorUtils.backendOrThrowable(
            backendMessage = "Backend says no",
            throwable = RuntimeException("Client fallback")
        )
        assertEquals("Backend says no", result)
    }
}
