-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Get basic XML config reader working. Still need to integrate with exi…
…sting machine() and pipeline().
- Loading branch information
Showing
5 changed files
with
77 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
use strict; | ||
use warnings; | ||
use Test::More; | ||
use FindBin; | ||
use lib "$FindBin::Bin/../lib"; | ||
|
||
use Plack::Test; | ||
use Plack::Builder; | ||
use HTTP::Request::Common; | ||
use Plack::Middleware::Magpie; | ||
|
||
my $context = { | ||
is => 'everything', | ||
actually => 'matters', | ||
is_frequently => [qw(ignored misunderstood)], | ||
}; | ||
|
||
my $handler = builder { | ||
enable "Magpie", context => $context, conf => 't/data/simple_conf.xml' | ||
}; | ||
|
||
test_psgi | ||
app => $handler, | ||
client => sub { | ||
my $cb = shift; | ||
{ | ||
my $res = $cb->(GET "http://localhost/stooges"); | ||
like $res->content, qr/_moebaz__moebar__curlyfoo_RIGHT_actually__is__is_frequently__larryfoo__larrybar_/; | ||
} | ||
{ | ||
my $res = $cb->(GET "http://localhost/"); | ||
like $res->content, qr/_moebaz__moebar__curlyfoo_RIGHT\b/; | ||
} | ||
|
||
}; | ||
|
||
done_testing(); |
File renamed without changes.
This file was deleted.
Oops, something went wrong.