diff options
author | Daniel Friesel <derf@finalrewind.org> | 2020-06-13 14:50:50 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2020-06-13 14:50:50 +0200 |
commit | c5e32e4576ee11b7aeff76be8102d6775840b988 (patch) | |
tree | e30af3a98b21912c2759fed56b955c43d82ce63e /t/30-invalid-xml.t | |
parent | a44bc293f453d12675335e8ef8745058ef3713f5 (diff) |
Add tests for DB backend
Diffstat (limited to 't/30-invalid-xml.t')
-rwxr-xr-x | t/30-invalid-xml.t | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/t/30-invalid-xml.t b/t/30-invalid-xml.t new file mode 100755 index 0000000..cb83a4c --- /dev/null +++ b/t/30-invalid-xml.t @@ -0,0 +1,21 @@ +#!/usr/bin/env perl +use strict; +use warnings; +use 5.020; + +use utf8; + +use File::Slurp qw(read_file); +use Test::More tests => 1; + +use Travel::Status::DE::HAFAS; + +my $xml = 'lol'; + +my $status = Travel::Status::DE::HAFAS->new( + service => 'DB', + station => 'Berlin Jannowitzbrücke', + xml => $xml +); + +is (scalar $status->results, 0, 'no results on invalid input'); |