Skip to content

Commit

Permalink
fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
teodesian committed Mar 8, 2020
1 parent b06fcf8 commit 28f0207
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions t/01-driver.t
Expand Up @@ -6,6 +6,7 @@ use Test::More;
use LWP::UserAgent;
use Test::LWP::UserAgent;
use IO::Socket::INET;
use Test::MockModule;
use Selenium::Remote::Driver;
use Selenium::Remote::Mock::Commands;
use Selenium::Remote::Mock::RemoteConnection;
Expand Down Expand Up @@ -133,6 +134,8 @@ GRID_STARTUP: {
};
$tua->map_response(qr{(?:grid/api/hub/status|session)}, $ok);

my $mock = Test::MockModule->new('Selenium::Remote::RemoteConnection');
$mock->redefine('check_status', sub { $grid_status_count++; 1 });
my $grid_driver = Selenium::Remote::Driver->new(ua => $tua);

ok(defined $grid_driver, 'Grid: Object loaded fine using grid/api/hub/status');
Expand Down

0 comments on commit 28f0207

Please sign in to comment.