diff options
author | Christopher Baines <mail@cbaines.net> | 2019-05-14 07:55:17 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2019-05-14 07:55:17 +0100 |
commit | 28c2d4608149b55d7547eab563e688814f3d7254 (patch) | |
tree | 8cf29d257f2fddd577b775aa44313cea9114ebb5 /tests | |
parent | 721d21ed4dfb09ea8cc6d2f5c1bdf6cd515f383e (diff) | |
download | data-service-28c2d4608149b55d7547eab563e688814f3d7254.tar data-service-28c2d4608149b55d7547eab563e688814f3d7254.tar.gz |
Fix type issues with the location ids
On one code path, they were handled as numbers, whereas elsewhere they were
handled as strings. This led to the package-metadata code trying to insert
duplicate entries.
Instead, just handle them as strings everywhere.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/model-package-metadata.scm | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/model-package-metadata.scm b/tests/model-package-metadata.scm index 83d77bf..5c0092d 100644 --- a/tests/model-package-metadata.scm +++ b/tests/model-package-metadata.scm @@ -34,6 +34,18 @@ conn (list mock-inferior-package-foo)) ((x) (string? x)))) + #:always-rollback? #t)) + + (with-postgresql-transaction + conn + (lambda (conn) + (test-equal "inferior-packages->package-metadata-ids" + (inferior-packages->package-metadata-ids + conn + (list mock-inferior-package-foo)) + (inferior-packages->package-metadata-ids + conn + (list mock-inferior-package-foo))) #:always-rollback? #t)))))) (test-end) |