mirror of
https://github.com/owncloud/android-library.git
synced 2025-06-07 16:06:08 +00:00
Fix WebfingerResponse tests
This commit is contained in:
parent
14baadd7ea
commit
3a27baad3a
@ -22,20 +22,20 @@ class WebFingerResponseTest {
|
|||||||
@Test
|
@Test
|
||||||
fun `check rel in too much information - ok`() {
|
fun `check rel in too much information - ok`() {
|
||||||
val response = loadResponses(TOO_MUCH_INFORMATION_JSON)!!
|
val response = loadResponses(TOO_MUCH_INFORMATION_JSON)!!
|
||||||
Assert.assertEquals("https://gast.somedomain.de", response.links[0].href)
|
Assert.assertEquals("https://gast.somedomain.de", response.links!![0].href)
|
||||||
Assert.assertEquals("http://webfinger.owncloud/rel/server-instance", response.links[0].rel)
|
Assert.assertEquals("http://webfinger.owncloud/rel/server-instance", response.links!![0].rel)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(expected = JsonDataException::class)
|
@Test(expected = JsonDataException::class)
|
||||||
fun `check key value pairs - ko - no href key`() {
|
fun `check key value pairs - ko - no href key`() {
|
||||||
val response = loadResponses(BROKEN_JSON)!!
|
val response = loadResponses(BROKEN_JSON)!!
|
||||||
Assert.assertEquals("https://gast.somedomain.de", response.links[0].href)
|
Assert.assertEquals("https://gast.somedomain.de", response.links!![0].href)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(expected = JsonDataException::class)
|
@Test(expected = JsonDataException::class)
|
||||||
fun `check key value pairs - ko - no rel key`() {
|
fun `check key value pairs - ko - no rel key`() {
|
||||||
val response = loadResponses(BROKEN_JSON)!!
|
val response = loadResponses(BROKEN_JSON)!!
|
||||||
Assert.assertEquals("https://gast.somedomain.de", response.links[0].href)
|
Assert.assertEquals("https://gast.somedomain.de", response.links!![0].href)
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user