Skip to content

Commit 590d5fd

Browse files
Merge pull request #1869 from nextcloud/fix/tags
Fix tags test
2 parents ca564f2 + 7d717b9 commit 590d5fd

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

library/src/androidTest/java/com/owncloud/android/lib/resources/tags/GetTagsRemoteOperationIT.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ class GetTagsRemoteOperationIT : AbstractIT() {
5959
// add color to one tag
6060
val plainColor = "ff00ff"
6161
val colorWithHex = "#$plainColor"
62-
val tag1 = sut.resultData.first()
63-
val tag2 = sut.resultData[1]
62+
val tag1 = sut.resultData.sortedBy { it.id }.last()
63+
val tag2 = sut.resultData.sortedBy { it.id }[sut.resultData.count() - 2]
6464
val newProps = DavPropertySet()
6565
newProps.add(
6666
DefaultDavProperty(
@@ -105,7 +105,7 @@ class GetTagsRemoteOperationIT : AbstractIT() {
105105
.find { it.remotePath == tagFolder }
106106
?.tags
107107
assertEquals(2, tags?.size)
108-
assertEquals(colorWithHex, tags?.first()?.color)
109-
assertEquals(null, tags?.get(1)?.color)
108+
assertEquals(null, tags?.first()?.color)
109+
assertEquals(colorWithHex, tags?.last()?.color)
110110
}
111111
}

0 commit comments

Comments
 (0)