Less obtrusive addition of test hooks
This commit is contained in:
parent
63d423c896
commit
7d33c42d35
@ -87,7 +87,7 @@ sub validate_password {
|
|||||||
sub fake_config {
|
sub fake_config {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $fake_config = {@_};
|
my $fake_config = {@_};
|
||||||
$self->qp->hooks->{config} = [
|
unshift @{ $self->qp->hooks->{config} ||= [] },
|
||||||
{
|
{
|
||||||
name => '___FakeHook___',
|
name => '___FakeHook___',
|
||||||
code => sub {
|
code => sub {
|
||||||
@ -95,8 +95,7 @@ sub fake_config {
|
|||||||
return DECLINED if ! exists $fake_config->{$conf};
|
return DECLINED if ! exists $fake_config->{$conf};
|
||||||
return OK, $fake_config->{$conf};
|
return OK, $fake_config->{$conf};
|
||||||
},
|
},
|
||||||
},
|
};
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub unfake_config {
|
sub unfake_config {
|
||||||
|
Loading…
Reference in New Issue
Block a user