lemonldap-ng-common/t/70-User-Agent.t
raw| 1 | use Test::More tests => 3; |
| 2 | |
| 3 | BEGIN { use_ok('Lemonldap::NG::Common::UserAgent') } |
| 4 | |
| 5 | my $ua = Lemonldap::NG::Common::UserAgent->new(); |
| 6 | |
| 7 | ok( $ua->agent =~ /^LemonLDAP-NG/, "Default User Agent" ); |
| 8 | |
| 9 | my $uajedi = Lemonldap::NG::Common::UserAgent->new( |
| 10 | { lwpOpts => { agent => "Not-The-Browser-You-Are-Looking-For/1977" } } ); |
| 11 | |
| 12 | ok( $uajedi->agent !~ /^LemonLDAP-NG/, "Overriden User Agent" ); |
| 13 |