diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/model-license-set.scm | 6 | ||||
-rw-r--r-- | tests/model-license.scm | 7 | ||||
-rw-r--r-- | tests/model-package-metadata.scm | 18 |
3 files changed, 23 insertions, 8 deletions
diff --git a/tests/model-license-set.scm b/tests/model-license-set.scm index 9cd949d..c39171f 100644 --- a/tests/model-license-set.scm +++ b/tests/model-license-set.scm @@ -19,10 +19,10 @@ "https://example.com/why-license-1")) (("License 1" "https://gnu.org/licenses/test-1.html" - "https://example.com/why-license-1") + #f) ("License 2" - "https://gnu.org/licenses/test-2.html" - "https://example.com/why-license-2"))))) + #f + #f))))) (with-postgresql-connection "test-model-license-set" diff --git a/tests/model-license.scm b/tests/model-license.scm index 7888117..8f4b0c3 100644 --- a/tests/model-license.scm +++ b/tests/model-license.scm @@ -17,10 +17,13 @@ "https://example.com/why-license-1")) (("License 1" "https://gnu.org/licenses/test-1.html" - "https://example.com/why-license-1") + #f) ("License 2" "https://gnu.org/licenses/test-2.html" - "https://example.com/why-license-2"))))) + #f) + ("License 3" + #f + #f))))) (with-postgresql-connection "test-model-license" diff --git a/tests/model-package-metadata.scm b/tests/model-package-metadata.scm index ea0cdbe..015a0b2 100644 --- a/tests/model-package-metadata.scm +++ b/tests/model-package-metadata.scm @@ -18,6 +18,15 @@ (home-page "https://example.com") (location (location "file.scm" 5 0)))) +(define mock-inferior-package-foo-2 + (mock-inferior-package + (name "foo") + (version "2") + (synopsis "Foo") + (description "Foo description") + (home-page #f) + (location #f))) + (define (test-license-set-ids conn) (mock ((guix-data-service model license) @@ -46,7 +55,8 @@ (match (inferior-packages->package-metadata-ids conn - (list mock-inferior-package-foo) + (list mock-inferior-package-foo + mock-inferior-package-foo-2) (test-license-set-ids conn)) ((x) (string? x)))) #:always-rollback? #t)) @@ -57,11 +67,13 @@ (test-equal "inferior-packages->package-metadata-ids" (inferior-packages->package-metadata-ids conn - (list mock-inferior-package-foo) + (list mock-inferior-package-foo + mock-inferior-package-foo-2) (test-license-set-ids conn)) (inferior-packages->package-metadata-ids conn - (list mock-inferior-package-foo) + (list mock-inferior-package-foo + mock-inferior-package-foo-2) (test-license-set-ids conn))) #:always-rollback? #t)))))) |