Permalink
Browse files

test routes

  • Loading branch information...
1 parent 5f655fd commit b4884d479a5d592eb44b48e539d969ac0b592649 @shelling committed Jan 11, 2013
Showing with 44 additions and 0 deletions.
  1. +44 −0 t/command.t
View
@@ -0,0 +1,44 @@
+use Modern::Perl;
+use Test::More;
+
+BEGIN {
+ use_ok 'HTTP::Balancer::Command';
+}
+
+is (
+ HTTP::Balancer::Command->dispatch(qw(add)),
+ "HTTP::Balancer::Command::Add",
+ "can run add",
+);
+
+is (
+ HTTP::Balancer::Command->dispatch(qw(add host)),
+ "HTTP::Balancer::Command::Add::Host",
+ "can run add host",
+);
+
+is (
+ HTTP::Balancer::Command->dispatch(qw(add backend)),
+ "HTTP::Balancer::Command::Add::Backend",
+ "can run add backend",
+);
+
+is (
+ HTTP::Balancer::Command->dispatch(qw(del)),
+ "HTTP::Balancer::Command::Del",
+ "can run del",
+);
+
+is (
+ HTTP::Balancer::Command->dispatch(qw(del host)),
+ "HTTP::Balancer::Command::Del::Host",
+ "can run del host",
+);
+
+is (
+ HTTP::Balancer::Command->dispatch(qw(del backend)),
+ "HTTP::Balancer::Command::Del::Backend",
+ "can run del backend",
+);
+
+done_testing;

0 comments on commit b4884d4

Please sign in to comment.