- is( $url->type, 'text/html' );
- is( lc $url->method, 'post' );
- is( $url->template, 'https://intranet/search?format=html' );
+ is( $url->type, 'text/html', 'content type' );
+ is( lc $url->method, 'post', 'method' );
+ is( $url->template, 'https://intranet/search?format=html', 'template' );
+ is_deeply( $url->params, { s => '{searchTerms}', o => '{startIndex}', c => '{itemsPerPage}', l => '{language}' }, 'params' );
+ my( $result, $post ) = $url->prepare_query( { searchTerms => 'x', startIndex => '1', itemsPerPage => 1, language => 'en' } );
+ is( $result, 'https://intranet/search?format=html', 'prepare_query (uri)' );
+ $post = { @$post };
+ is_deeply( $post, { s => 'x', o => 1, c => 1, l => 'en' }, 'prepare_query (params)' );