test: move importer tests to tests/ (via DocumentParser)
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user