diff options
author | Christopher Baines <mail@cbaines.net> | 2019-05-13 21:02:53 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2019-05-13 21:07:48 +0100 |
commit | 7341d1725420b431160536c1cf2b34a662ff0a86 (patch) | |
tree | f1490bcbf7133a2f5b8e46910138c991a6cf0ef3 /tests | |
parent | 9aaab6b751993d6774ed96b0f8632d8af3d565c7 (diff) | |
download | data-service-7341d1725420b431160536c1cf2b34a662ff0a86.tar data-service-7341d1725420b431160536c1cf2b34a662ff0a86.tar.gz |
Store and display the location of packages
Store the location a package can be found at, and display this on the package
page.
If available, link off to the git repository containing the package.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/mock-inferior.scm | 10 | ||||
-rw-r--r-- | tests/model-package-metadata.scm | 4 |
2 files changed, 11 insertions, 3 deletions
diff --git a/tests/mock-inferior.scm b/tests/mock-inferior.scm index 6424cd9..b59874e 100644 --- a/tests/mock-inferior.scm +++ b/tests/mock-inferior.scm @@ -9,6 +9,7 @@ mock-inferior-package-synopsis mock-inferior-package-description mock-inferior-package-home-page + mock-inferior-package-location with-mock-inferior-packages)) @@ -19,7 +20,8 @@ (version mock-inferior-package-version) (synopsis mock-inferior-package-synopsis) (description mock-inferior-package-description) - (home-page mock-inferior-package-home-page)) + (home-page mock-inferior-package-home-page) + (location mock-inferior-package-location)) (define (with-mock-inferior-packages f) (mock @@ -42,4 +44,8 @@ ((guix inferior) inferior-package-home-page mock-inferior-package-home-page) - (f))))))) + (mock + ((guix inferior) + inferior-package-location + mock-inferior-package-location) + (f)))))))) diff --git a/tests/model-package-metadata.scm b/tests/model-package-metadata.scm index 4c2bc8e..83d77bf 100644 --- a/tests/model-package-metadata.scm +++ b/tests/model-package-metadata.scm @@ -1,6 +1,7 @@ (define-module (test-model-package-metadata) #:use-module (ice-9 match) #:use-module (srfi srfi-64) + #:use-module (guix utils) #:use-module (tests mock-inferior) #:use-module (guix-data-service database)) @@ -12,7 +13,8 @@ (version "2") (synopsis "Foo") (description "Foo description") - (home-page "https://example.com"))) + (home-page "https://example.com") + (location (location "file.scm" 5 0)))) (with-mock-inferior-packages (lambda () |