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