Skip to content
This repository
Browse code

Added basic tests for user admin routes.

  • Loading branch information...
commit 77de34112d360e16f2520781ecc925cbe5ec1707 1 parent 4c88009
Dave Cross authored February 03, 2014

Showing 1 changed file with 23 additions and 0 deletions. Show diff stats Hide diff stats

  1. 23  t/003_user_admin.t
23  t/003_user_admin.t
... ...
@@ -0,0 +1,23 @@
  1
+use Test::More;
  2
+use strict;
  3
+use warnings;
  4
+
  5
+use lib 'lib';
  6
+
  7
+# the order is important
  8
+use Lystyng;
  9
+use Dancer::Test;
  10
+
  11
+my %route = (
  12
+  register => 200,
  13
+  login    => 200,
  14
+  logout   => 302,
  15
+);
  16
+
  17
+for (keys %route) {
  18
+  route_exists [ GET => "/$_" ], "a get route handler is defined for /$_";
  19
+  response_status_is ['GET' => "/$_"], $route{$_},
  20
+    "response status is $route{$_} for /$_";
  21
+}
  22
+
  23
+done_testing;

0 notes on commit 77de341

Please sign in to comment.
Something went wrong with that request. Please try again.