fixed resolver test
Juan Batiz-Benet committed
Oct 9, 2014 at 03:50 UTC
a53813c8fa1efac6509f4aa7c5ca49a0d2cfc705
1 file changed
+7
-1
namesys/resolve_test.go
+7
-1
@@ -26,6 +26,12 @@ func TestRoutingResolve(t *testing.T) {
26
}
27
28
err = publisher.Publish(privk, "Hello")
29
+ if err == nil {
30
+ t.Fatal("should have errored out when publishing a non-multihash val")
31
+ }
32
+
33
+ h := u.Key(u.Hash([]byte("Hello"))).Pretty()
34
+ err = publisher.Publish(privk, h)
35
if err != nil {
36
t.Fatal(err)
37
}
@@ -41,7 +47,7 @@ func TestRoutingResolve(t *testing.T) {
47
t.Fatal(err)
48
}
49
44
- if res != "Hello" {
50
+ if res != h {
51
t.Fatal("Got back incorrect value.")
52
}
53
}