app/src/test/java/dev/equwal/inkupdate/MoreAppsTest.kt (1052 bytes)
1 // SPDX-License-Identifier: GPL-3.0-or-later 2 // Copyright (c) 2026 equwal 3 package dev.equwal.inkupdate 4 5 import org.junit.Assert.assertEquals 6 import org.junit.Assert.assertFalse 7 import org.junit.Assert.assertTrue 8 import org.junit.Test 9 10 /** The list of the More apps section. */ 11 class MoreAppsTest { 12 13 @Test fun `the list leaves out Ink Update`() { 14 assertFalse(MORE_APPS.any { "equwal/ink-update" in it.url }) 15 } 16 17 @Test fun `each link opens an https page`() { 18 for (app in MORE_APPS) assertTrue(app.url, app.url.startsWith("https://")) 19 } 20 21 @Test fun `the list keeps the order of the catalog`() { 22 assertEquals( 23 listOf("https://subread.space/", "https://booksimulator.com/", "https://honjimaku.com/", "https://sbmsync.com/"), 24 MORE_APPS.take(4).map { it.url } 25 ) 26 assertEquals("https://recentlywritten.com/projects.html", MORE_APPS.last().url) 27 // The catalog has 15 entries. Ink Update is the one that is not in the list. 28 assertEquals(14, MORE_APPS.size) 29 } 30 }