File: 11-server-name.t

package info (click to toggle)
librt-client-rest-perl 1%3A0.56-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 568 kB
  • sloc: perl: 4,205; makefile: 9
file content (20 lines) | stat: -rw-r--r-- 628 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!perl

use strict;
use warnings;
use Test::More tests => 5;
use RT::Client::REST;

my $rt = RT::Client::REST->new(server => 'http://localhost/');

is $rt->server, 'http://localhost', 'Trailing slash stripped';
is $rt->_rest, 'http://localhost/REST/1.0', 'rest uri ok';


$rt = RT::Client::REST->new(server => 'http://localhost/bts/',
                            timeout => '10/', # bogus
                           );

is $rt->server, 'http://localhost/bts', 'Trailing slash stripped';
is $rt->_rest, 'http://localhost/bts/REST/1.0', 'rest uri ok';
is $rt->timeout, '10/', 'trailing slash on timeout preserved, even if bogus';