summary refs log tree commit diff
path: root/t/hosts.t
diff options
context:
space:
mode:
authorRobin Edwards <robin.ge@gmail.com>2011-04-20 14:38:43 +0100
committerRobin Edwards <robin.ge@gmail.com>2011-04-20 14:38:43 +0100
commit79bea382fd2c0753ca9ace79a11bb74c9a1d722b (patch)
treebde42a47792a27e0a863ee527b88c8c24258f7e9 /t/hosts.t
parentMerge remote branch 'simon/fix_link_encoding' (diff)
downloadnet-riak-79bea382fd2c0753ca9ace79a11bb74c9a1d722b.tar.gz
merged pbc branch to master
Diffstat (limited to 't/hosts.t')
-rw-r--r--t/hosts.t20
1 files changed, 20 insertions, 0 deletions
diff --git a/t/hosts.t b/t/hosts.t
new file mode 100644
index 0000000..801e8b4
--- /dev/null
+++ b/t/hosts.t
@@ -0,0 +1,20 @@
+use strict;
+use warnings;
+use Test::More;
+
+package test::host;
+use Moose; with 'Net::Riak::Role::Hosts';
+
+package main;
+
+my $test = test::host->new();
+is scalar @{$test->host}, 1, 'got one host';
+
+ok my $host = $test->get_host, 'got host';
+is $host, 'http://127.0.0.1:8098', 'host is ok';
+
+$test = test::host->new(host => ['http://10.0.0.40', 'http://10.0.0.41']);
+is scalar @{$test->host}, 2, 'got two hosts';
+ok $host = $test->get_host, 'got host';
+
+done_testing;