Skip to content

Commit

Permalink
[FMS] Adds Mock::Tilma to test file
Browse files Browse the repository at this point in the history
Put in the tilma mock to make sure test calls
are not being made that leak out
  • Loading branch information
MorayMySoc committed Jan 29, 2024
1 parent dcee0f3 commit 3b17ac6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions t/app/controller/auth_social.t
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use JSON::MaybeXS;
use t::Mock::Facebook;
use t::Mock::Twitter;
use t::Mock::OpenIDConnect;
use t::Mock::Tilma;

use FixMyStreet::TestMech;
my $mech = FixMyStreet::TestMech->new;
Expand Down Expand Up @@ -45,6 +46,9 @@ foreach ($body->id, $body2->id, $body3->id) {
my $resolver = Test::MockModule->new('Email::Valid');
my $social = Test::MockModule->new('FixMyStreet::App::Controller::Auth::Social');
$social->mock('generate_nonce', sub { 'MyAwesomeRandomValue' });
my $tilma = t::Mock::Tilma->new;
LWP::Protocol::PSGI->register($tilma->to_psgi_app, host => 'tilma.mysociety.org');
LWP::Protocol::PSGI->register($tilma->to_psgi_app, host => 'tilma.staging.mysociety.org');

for my $test (
{
Expand Down

0 comments on commit 3b17ac6

Please sign in to comment.