summaryrefslogtreecommitdiff
path: root/tests/gem.scm
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2016-12-18 09:55:17 +0100
committerRicardo Wurmus <rekado@elephly.net>2016-12-18 09:55:17 +0100
commit506abddb99e02f824bff7ed7d7f7b37c4dafe0a7 (patch)
tree91279e7654bdda00e6f801793aed1e73755a1533 /tests/gem.scm
parent51d8395ac689429998a1e7a3a16df6510d500358 (diff)
downloadpatches-506abddb99e02f824bff7ed7d7f7b37c4dafe0a7.tar
patches-506abddb99e02f824bff7ed7d7f7b37c4dafe0a7.tar.gz
tests: Mock up http-fetch in import tests.
This is a follow-up to commit 63773200d7ac68fcaee6efd9ffe8ea7aa3fafa38. * tests/gem.scm ("gem->guix-package"): Replace mock definition of "url-fetch" with "http-fetch". * tests/pypi.scm ("pypi->guix-package"): Add mock definition of "http-fetch".
Diffstat (limited to 'tests/gem.scm')
-rw-r--r--tests/gem.scm10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/gem.scm b/tests/gem.scm
index a46c2b1439..669cd8ee60 100644
--- a/tests/gem.scm
+++ b/tests/gem.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015 David Thompson <davet@gnu.org>
+;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -45,13 +46,12 @@
(test-assert "gem->guix-package"
;; Replace network resources with sample data.
- (mock ((guix import utils) url-fetch
- (lambda (url file-name)
+ (mock ((guix http-client) http-fetch
+ (lambda (url)
(match url
("https://rubygems.org/api/v1/gems/foo.json"
- (with-output-to-file file-name
- (lambda ()
- (display test-json))))
+ (values (open-input-string test-json)
+ (string-length test-json)))
(_ (error "Unexpected URL: " url)))))
(match (gem->guix-package "foo")
(('package