summary refs log tree commit diff
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2010-04-27 17:27:28 +0200
committerfranck cuny <franck@lumberjaph.net>2010-04-27 17:27:28 +0200
commit81e4e5bbd5cf289f040cbda2d62bbda57814b402 (patch)
tree5d8da31207f642454a49e21a317382498d9dc677
parentreturn a hash object (diff)
downloadplack-middleware-throttle-81e4e5bbd5cf289f040cbda2d62bbda57814b402.tar.gz
header, not headers
-rw-r--r--t/01_hourly.t4
-rw-r--r--t/02_daily.t4
-rw-r--r--t/03_interval.t2
3 files changed, 5 insertions, 5 deletions
diff --git a/t/01_hourly.t b/t/01_hourly.t
index 31a4e98..63f912d 100644
--- a/t/01_hourly.t
+++ b/t/01_hourly.t
@@ -23,12 +23,12 @@ test_psgi
             my $req = GET "http://localhost/";
             my $res = $cb->($req);
             is $res->code, 200, 'http response is 200';
-            ok $res->headers('X-RateLimit-Limit'), 'header ratelimit';
+            ok $res->header('X-RateLimit-Limit'), 'header ratelimit';
         }
         my $req = GET "http://localhost/";
         my $res = $cb->($req);
         is $res->code, 503, 'http response is 503';
-        ok $res->headers('X-RateLimit-Reset'), 'header reset';
+        ok $res->header('X-RateLimit-Reset'), 'header reset';
     }
     };
 
diff --git a/t/02_daily.t b/t/02_daily.t
index 5353206..25b6d50 100644
--- a/t/02_daily.t
+++ b/t/02_daily.t
@@ -23,12 +23,12 @@ test_psgi
             my $req = GET "http://localhost/";
             my $res = $cb->($req);
             is $res->code, 200, 'http response is 200';
-            ok $res->headers('X-RateLimit-Limit'), 'header ratelimit';
+            ok $res->header('X-RateLimit-Limit'), 'header ratelimit';
         }
         my $req = GET "http://localhost/";
         my $res = $cb->($req);
         is $res->code, 503, 'http response is 503';
-        ok $res->headers('X-RateLimit-Reset'), 'header reset';
+        ok $res->header('X-RateLimit-Reset'), 'header reset';
     }
     };
 
diff --git a/t/03_interval.t b/t/03_interval.t
index db0aafe..dae7933 100644
--- a/t/03_interval.t
+++ b/t/03_interval.t
@@ -26,7 +26,7 @@ test_psgi
             my $req = GET "http://localhost/";
             my $res = $cb->($req);
             is $res->code, 503, 'http response is 503';
-            ok $res->headers('X-RateLimit-Reset'), 'header reset';
+            ok $res->header('X-RateLimit-Reset'), 'header reset';
         }
         sleep(3);
         $req = GET "http://localhost/";