Fix tests

This commit is contained in:
Mikołaj Pich 2019-11-17 01:04:52 +01:00
parent 433cd83357
commit ff7c3c934c
No known key found for this signature in database
GPG key ID: F62B26E36D4C4BAA
3 changed files with 4 additions and 4 deletions

View file

@ -62,7 +62,7 @@ class UonetTest {
.build().create()
)
val certificate = register.getCertificate(TOKEN, PIN, DEVICE_NAME)
val certificate = register.getCertificate(TOKEN, PIN, DEVICE_NAME, "8.1.0")
val certSubscriber = TestObserver<CertificateResponse>()
certificate.subscribe(certSubscriber)
certSubscriber.assertComplete()

View file

@ -20,9 +20,9 @@ class RoutingRulesRepositoryTest {
@Test
fun getRouteByToken() {
server.enqueue(MockResponse().setBody(RoutingRulesRepositoryTest::class.java.getResource("RoutingRules.txt").readText()))
server.start(3000)
server.start(3030)
val repo = RoutingRulesRepository(getRetrofitBuilder().baseUrl("http://localhost:3000").build().create())
val repo = RoutingRulesRepository(getRetrofitBuilder().baseUrl("http://localhost:3030").build().create())
val route = repo.getRouteByToken("KA200000").blockingGet()
assertEquals("https://uonetplus-komunikacja-test.mcuw.katowice.eu", route)

View file

@ -10,7 +10,7 @@ class ScrapperTest : BaseLocalTest() {
@Test
fun changeTest() {
server.enqueue(MockResponse().setBody(AttendanceSummaryTest::class.java.getResource("Frekwencja.html").readText()))
server.enqueue(MockResponse().setBody(AttendanceSummaryTest::class.java.getResource("Przedmioty.json").readText()))
server.start(3000) //
val api = Scrapper().apply {