Skip to content

Commit 26ee48e

Browse files
committed
test(sort): update SortOptionTest for new COLOR entry
The hardcoded entry count (4β†’5) and the prefsValue/fromPrefsValue assertions were not extended when COLOR was added in the feat commit.
1 parent 3d46aa9 commit 26ee48e

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

β€Žandroid/app/src/test/java/dev/dettmer/simplenotes/models/SortOptionTest.ktβ€Ž

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ class SortOptionTest {
1717
assertEquals("createdAt", SortOption.CREATED_AT.prefsValue)
1818
assertEquals("title", SortOption.TITLE.prefsValue)
1919
assertEquals("noteType", SortOption.NOTE_TYPE.prefsValue)
20+
assertEquals("color", SortOption.COLOR.prefsValue)
2021
}
2122

2223
@Test
@@ -25,6 +26,7 @@ class SortOptionTest {
2526
assertEquals(SortOption.CREATED_AT, SortOption.fromPrefsValue("createdAt"))
2627
assertEquals(SortOption.TITLE, SortOption.fromPrefsValue("title"))
2728
assertEquals(SortOption.NOTE_TYPE, SortOption.fromPrefsValue("noteType"))
29+
assertEquals(SortOption.COLOR, SortOption.fromPrefsValue("color"))
2830
}
2931

3032
@Test
@@ -34,8 +36,8 @@ class SortOptionTest {
3436
}
3537

3638
@Test
37-
fun `SortOption has exactly 4 entries`() {
38-
assertEquals(4, SortOption.entries.size)
39+
fun `SortOption has exactly 5 entries`() {
40+
assertEquals(5, SortOption.entries.size)
3941
}
4042

4143
// ═══════════════════════════════════════════════

0 commit comments

Comments
Β (0)