Add tests for core modules - #332
Draft
troglodyne-bot wants to merge 1 commit into
Draft
Conversation
…og::Auth, Trog::SQLite::TagIndex Closes Troglodyne-Internet-Widgets#5 - Fix pre-existing errstr mock gap in t/Trog-SQLite.t (dbh subtest) - t/Trog-Utils.t: tests for coerce_array, strip_and_trunc, uuid, mime_type - t/Trog-Config.t: tests for get() precedence and missing-config die - t/Trog-Data.t: tests for factory dispatch and memoization - t/Trog-Auth.t: tests for session, user, ACL, and useradd/mksession using a real in-memory SQLite database seeded from the auth schema - t/Trog-SQLite-TagIndex.t: tests for tags, routes, aliases, posts_for_tags using a real in-memory SQLite database seeded from the flatfile schema Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This was referenced Jun 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a test suite for the core tCMS modules identified in issue #5. Tests cover observable behavior (return values, DB state, exceptions) using real in-memory SQLite databases where SQL logic is involved, and lightweight package stubs for modules with heavy native dependencies.
Closes #5
Changes
coerce_array,strip_and_trunc,uuid,mime_typeuseradd, andmksession— uses a real in-memory SQLite DB seeded fromschema/auth.schematags,routes,aliases,posts_for_tags— uses a real in-memory SQLite DB seeded fromschema/flatfile.schemaTest plan
PERL5LIB=<local-perl5>/lib/perl5 prove -Ilib t/→ 6 files, 37 tests, all passTest::MockModule,Test::Fatal,Config::Simple,FindBin::libs,DBI,DBD::SQLite,Plack,MojoliciousGenerated by Kōan