Bug 17047: (RM follow-up) Fix tests for Ubuntu
authorNick Clemens <nick@bywatersolutions.com>
Mon, 11 Feb 2019 20:49:00 +0000 (20:49 +0000)
committerNick Clemens <nick@bywatersolutions.com>
Mon, 11 Feb 2019 20:49:00 +0000 (20:49 +0000)
In Ubuntu the message returned is:
An error occurred, mana server returned: Can't connect to foo.bar:443 (Name or service not known)

Checking for 'Can't connect' and not enforcing end of string should be sufficient and fixes the test

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
t/db_dependent/Koha/SharedContent.t

index 44c9f78..2be0e1d 100644 (file)
@@ -46,7 +46,7 @@ t::lib::Mocks::mock_config( 'mana_config', 'https://foo.bar');
 is(Koha::SharedContent::get_sharing_url(), 'https://foo.bar', 'Mana URL');
 
 my $result = Koha::SharedContent::search_entities('report', $query);
-ok($result->{msg} =~ /Can\'t connect to foo.bar:443$/, 'Unable to connect');
+ok($result->{msg} =~ /Can\'t connect to foo.bar:443/, 'Unable to connect');
 is($result->{code}, 500, 'Code is 500');
 
 my $ua = Test::MockModule->new('LWP::UserAgent');