From ee4d099675f8a64e018398dfa5df699f0367532a Mon Sep 17 00:00:00 2001
From: Ruben Sousa <ruben@rubensousa.com>
Date: Sat, 15 Jun 2024 13:30:17 +0200
Subject: [PATCH] Fix adapter content assertion

---
 .../dpadrecyclerview/test/tests/drag/DragHelperGridTest.kt   | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/dpadrecyclerview/src/androidTest/kotlin/com/rubensousa/dpadrecyclerview/test/tests/drag/DragHelperGridTest.kt b/dpadrecyclerview/src/androidTest/kotlin/com/rubensousa/dpadrecyclerview/test/tests/drag/DragHelperGridTest.kt
index da9de17a..7651e4bb 100644
--- a/dpadrecyclerview/src/androidTest/kotlin/com/rubensousa/dpadrecyclerview/test/tests/drag/DragHelperGridTest.kt
+++ b/dpadrecyclerview/src/androidTest/kotlin/com/rubensousa/dpadrecyclerview/test/tests/drag/DragHelperGridTest.kt
@@ -160,13 +160,12 @@ class DragHelperGridTest {
         KeyEvents.pressUp(times = 1)
 
         // then
-        assertFocusAndSelection(position = bottomColumnPosition)
+        assertFocusAndSelection(position = topColumnPosition)
         testAdapter.assertContents { index ->
             when {
                 index < topColumnPosition -> index
                 index == topColumnPosition -> bottomColumnPosition
-                index < bottomColumnPosition -> index - 1
-                index == bottomColumnPosition -> topColumnPosition
+                index <= bottomColumnPosition -> index - 1
                 else -> index
             }
         }