Merged in feature/document (pull request #36)

Document CRUD

* doccreate

* dochashlocandget

* depsandtodo
This commit is contained in:
Michael McGuinness
2025-01-24 16:12:25 +00:00
parent 4ec1d51a12
commit b16ff55afa
31 changed files with 381 additions and 82 deletions
@@ -27,7 +27,11 @@ func TestDocument(t *testing.T) {
jobId, err := queries.CreateJob(ctx, clientId)
assert.Nil(t, err)
id, err := queries.CreateDocument(ctx, jobId)
hash := "example_hash"
id, err := queries.CreateDocument(ctx, &repository.CreateDocumentParams{
Jobid: jobId,
Hash: hash,
})
assert.Nil(t, err)
assert.NotEmpty(t, id)
@@ -36,5 +40,6 @@ func TestDocument(t *testing.T) {
assert.EqualExportedValues(t, &repository.Document{
ID: id,
Jobid: jobId,
Hash: hash,
}, doc)
}