Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

made mock request cookies and session persistent

  • Loading branch information...
commit 6230641f8bdd0f303a109605acfd80a0de380e28 1 parent e9ea3d0
@beppu authored
Showing with 4 additions and 4 deletions.
  1. +1 −1  Changes
  2. +3 −3 lib/Squatting/With/MockRequest.pm
View
2  Changes
@@ -17,7 +17,7 @@ Beyond (unreleased)
- PSGI support by default
* Replace Shell::Perl with something based on Eval::WithLexicals.
-0.80 unreleased
+0.80 2011-04-27
- [ MAJOR API CHANGE! ]
- You don't say: use base 'Squatting' anymore.
- When creating a Squatting app,
View
6 lib/Squatting/With/MockRequest.pm
@@ -3,17 +3,17 @@ use common::sense;
# TODO - hook these in to the init
our %cookies;
-our %state;
-our %env;
+our %state = (mock_request => 1);
sub mock_controller_init {
my ($app, $cc, @args) = @_;
$cc->{cr} = {}; # TODO - provide a mock Continuity::Request
$cc->{env} = { REQUEST_PATH => &{"$app"."::Controllers::R"}($cc->name, @args) };
- $cc->{cookies} = {};
+ $cc->{cookies} = \%cookies;
$cc->{input} = {};
$cc->{headers} = {};
$cc->{v} = {};
+ $cc->{state} = \%state;
$cc->{status} = 200;
$cc;
};

0 comments on commit 6230641

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