test: move importer tests to tests/ (via DocumentParser)

This commit is contained in:
2026-10-25 22:48:30 +01:00
parent 760acb1f9f
commit 52bbb85980
4 changed files with 20 additions and 11 deletions

View File

@@ -1,4 +1,16 @@
use super::*;
use domain::{
models::{FileFormat, ParsedFile},
ports::DocumentParser,
};
use importer::ImporterDocumentParser;
fn parse_csv(data: &[u8]) -> Result<ParsedFile, domain::models::ImportError> {
ImporterDocumentParser.parse(data, FileFormat::Csv)
}
fn parse_json(data: &[u8]) -> Result<ParsedFile, domain::models::ImportError> {
ImporterDocumentParser.parse(data, FileFormat::Json)
}
#[test]
fn csv_parses_headers_and_rows() {