Add RethinkDB tests

- Add env variables for all data tests
- Standardize Page.All behavior
- Add Page.Count* tests
This commit is contained in:
2024-01-27 18:04:41 -05:00
parent f701fc9c93
commit 0e8044b948
10 changed files with 220 additions and 17 deletions

View File

@@ -35,13 +35,13 @@ type PostgresPageData(log: ILogger) =
// IMPLEMENTATION FUNCTIONS
/// Get all pages for a web log (without text or revisions)
/// Get all pages for a web log (without text, metadata, revisions, or prior permalinks)
let all webLogId =
log.LogTrace "Page.all"
Custom.list
$"{selectWithCriteria Table.Page} ORDER BY LOWER(data ->> '{nameof Page.Empty.Title}')"
[ webLogContains webLogId ]
fromData<Page>
(fun row -> { fromData<Page> row with Text = ""; Metadata = []; PriorPermalinks = [] })
/// Count all pages for the given web log
let countAll webLogId =