Skip to content

Commit

Permalink
👽️ Sync backend and frontend Restaurant model
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoColman committed Jan 27, 2024
1 parent d792796 commit 7fe0428
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
12 changes: 6 additions & 6 deletions app/src/main/java/app/jopiter/restaurant/model/Restaurant.kt
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@ data class Restaurant(
3L to "Restaurante área 2",
4L to "Restaurante CRHEA",
5L to "Pirassununga",
6L to "Central",
7L to "PUSP-C",
8L to "Física",
9L to "Químicas",
6L to "Central - Campus Butantã",
7L to "PUSP-C - Campus Butantã",
8L to "Física - Campus Butantã",
9L to "Químicas - Campus Butantã",
11L to "Fac. Saúde Pública",
12L to "Escola de Enfermagem",
13L to "EACH",
14L to "Largo São Francisco",
14L to "Fac. Direito",
17L to "EEL - Área I",
19L to "Restaurante Central",
19L to "Restaurante Central -Campus RP",
20L to "Bauru",
23L to "EEL - Área II"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import io.kotest.extensions.mockserver.MockServerListener
import io.kotest.inspectors.forAtLeast
import io.kotest.matchers.result.shouldBeFailure
import io.kotest.matchers.result.shouldBeSuccess
import io.kotest.matchers.shouldBe
import org.mockserver.client.MockServerClient
import org.mockserver.mock.OpenAPIExpectation.openAPIExpectation
import org.mockserver.model.Delay.seconds
Expand Down Expand Up @@ -81,7 +82,9 @@ class JopiterRestaurantClientTest : FunSpec({

test("Can parse current production response") {
val client = JopiterRestaurantClient("https://persephone.jopiter.app")
client.fetchRestaurants().shouldBeSuccess()
client.fetchRestaurants().shouldBeSuccess {
it.flatMap { it.restaurants }.associate { it.id to it.name } shouldBe Restaurant.AllRestaurants
}
}
}

Expand Down

0 comments on commit 7fe0428

Please sign in to comment.