root/branches/new-install-process/t/78_about.t

Revision 1096, 1.0 kB (checked in by dom, 19 months ago)

Add OpenSearch? description (references #180)

Line 
1use strict;
2use warnings;
3
4use Test::More;
5use OpenGuides;
6use OpenGuides::Test;
7
8plan tests => 3;
9
10my $config = OpenGuides::Test->make_basic_config;
11$config->site_name('My site');
12$config->contact_email('me@example.com');
13my $guide = OpenGuides->new(config => $config);
14
15my $output = $guide->display_about(return_output => 1);
16
17like( $output, qr|My site</a></h1>.*<h2>is powered by|ms,
18    "HTML about text is displayed, including the site name" );
19
20$output = $guide->display_about(return_output => 1,
21                                format        => "opensearch"
22                               );
23
24like( $output, qr|OpenSearchDescription.*<Tags>My site</Tags>.*<Contact>me\@example.com</Contact>|ms,
25    "OpenSearch about text is displayed, including the site name and contact");
26
27$output = $guide->display_about(return_output => 1,
28                                format        => "rdf"
29                               );
30
31like( $output, qr|<Project rdf:ID="OpenGuides">|ms,
32    "RDF about text is displayed");
Note: See TracBrowser for help on using the browser.