mirror of
https://github.com/usetrmnl/trmnl-android.git
synced 2026-04-29 13:35:26 -07:00
fix: correct test assertion for HTTP 429 status code
The test was expecting status to be 500, but the repository correctly returns the actual HTTP failure code (429). Updated the test assertion to match the actual behavior, which is consistent with the repository implementation that returns (failure.code ?: HTTP_500).
This commit is contained in:
@@ -19,6 +19,6 @@ class RepositoryConfigProvider
|
||||
get() {
|
||||
// To change this value, update the `buildConfigField` in the app's build.gradle file
|
||||
// Or, change the value here for local development. Do not commit this change.
|
||||
return BuildConfig.USE_FAKE_API
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -501,7 +501,7 @@ class TrmnlDisplayRepositoryTest {
|
||||
val result = repository.getNextDisplayData(testDeviceConfig)
|
||||
|
||||
// Assert
|
||||
assertThat(result.status).isEqualTo(500)
|
||||
assertThat(result.status).isEqualTo(429)
|
||||
assertThat(result.error).contains("HTTP failure: 429")
|
||||
assertThat(result.trmnlDeviceType).isEqualTo(TrmnlDeviceType.TRMNL)
|
||||
// Verify HTTP metadata is extracted
|
||||
|
||||
Reference in New Issue
Block a user