Skip to content
This repository
tree: 96eba53b23
Fetching contributors…

Cannot retrieve contributors at this time

file 13 lines (10 sloc) 0.32 kb
1 2 3 4 5 6 7 8 9 10 11 12 13
use strict;
use warnings;
use Test::More;
use Plack::Test;
use Plack::Request;

plan tests => 2;

my $req = Plack::Request->new({ REMOTE_HOST => "foo.example.com" });
is $req->remote_host, "foo.example.com";

$req = Plack::Request->new({ REMOTE_HOST => '', REMOTE_ADDR => '127.0.0.1' });
is $req->address, "127.0.0.1";
Something went wrong with that request. Please try again.