From cb06ebdffd509f997ae91ad542306413fb478c33 Mon Sep 17 00:00:00 2001 From: zelig Date: Tue, 2 Jun 2015 23:42:11 +0100 Subject: [PATCH] fix js console http test with bzz scheme --- cmd/geth/js_bzz_test.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/cmd/geth/js_bzz_test.go b/cmd/geth/js_bzz_test.go index f9a1a633e8..feaa2a75a1 100644 --- a/cmd/geth/js_bzz_test.go +++ b/cmd/geth/js_bzz_test.go @@ -55,14 +55,18 @@ func TestHTTP(t *testing.T) { } defer ethereum.Stop() defer os.RemoveAll(tmp) - if checkEvalJSON(t, repl, `hash = bzz.put("6*7", "application/javascript")`, `"97f1b7c7ea12468fd37c262383b9aa862d0cfbc4fc7218652374679fc5cf40cd"`) != nil { + if checkEvalJSON(t, repl, `hash = bzz.put("f42 = function() { return 42 }", "application/javascript")`, `"e6847876f00102441f850b2d438a06d10e3bf24e6a0a76d47b073a86c3c2f9ac"`) != nil { return } - if checkEvalJSON(t, repl, `http.get("bzz://"+hash)`, `"6*7"`) != nil { + if checkEvalJSON(t, repl, `http.get("bzz://"+hash)`, `"f42 = function() { return 42 }"`) != nil { return } - if checkEvalJSON(t, repl, `http.loadScript("bzz://"+hash)`, `42`) != nil { + if checkEvalJSON(t, repl, `http.loadScript("bzz://"+hash)`, `true`) != nil { + return + } + + if checkEvalJSON(t, repl, `f42()`, `42`) != nil { return } }