diff options
| author | Danilo M. <danix@danix.xyz> | 2026-11-05 15:52:37 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-11-05 15:52:37 +0100 |
| commit | 6195060f35c78249f4630865e09855f9e624bd32 (patch) | |
| tree | 0611f94925e6768621cace46c7b97886e7dc8469 /app/src/test/java | |
| parent | daa7ee010aa88df8664c9b10eb09bbe95eb11bd9 (diff) | |
| download | HardenedPass-6195060f35c78249f4630865e09855f9e624bd32.tar.gz HardenedPass-6195060f35c78249f4630865e09855f9e624bd32.zip | |
feat(app): add an about screen
Version with build number, documentation and project links, Ko-fi, the privacy
statement, the certificate this copy was really signed with, and the licenses.
Debug builds also show the git commit, since a test build can share its version
with a release.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'app/src/test/java')
| -rw-r--r-- | app/src/test/java/app/passwordstore/ui/settings/AboutTest.kt | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/app/src/test/java/app/passwordstore/ui/settings/AboutTest.kt b/app/src/test/java/app/passwordstore/ui/settings/AboutTest.kt new file mode 100644 index 00000000..e692c229 --- /dev/null +++ b/app/src/test/java/app/passwordstore/ui/settings/AboutTest.kt @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2026 Danilo M. <danix@danix.xyz> + * SPDX-License-Identifier: GPL-3.0-only + */ + +package app.passwordstore.ui.settings + +import kotlin.test.Test +import kotlin.test.assertEquals + +class AboutTest { + + @Test + fun versionLineWithoutCommit() { + assertEquals("0.3.0 (300)", versionLine("0.3.0", 300, "")) + } + + @Test + fun versionLineWithCommit() { + assertEquals("0.3.0-debug (300) · daa7ee01", versionLine("0.3.0-debug", 300, "daa7ee01")) + } + + @Test + fun changelogUrlPointsAtTheReleaseTag() { + assertEquals( + "https://github.com/danixland/HardenedPass/blob/v0.3.0/CHANGELOG.md", + changelogUrl("0.3.0-debug"), + ) + } + + @Test + fun fingerprintIsColonSeparatedUppercaseSha256() { + assertEquals( + "BA:78:16:BF:8F:01:CF:EA:41:41:40:DE:5D:AE:22:23:" + + "B0:03:61:A3:96:17:7A:9C:B4:10:FF:61:F2:00:15:AD", + certificateFingerprint("abc".encodeToByteArray()), + ) + } +} |
