| Line | |
|---|
| 1 | use strict; |
|---|
| 2 | use warnings; |
|---|
| 3 | |
|---|
| 4 | use Test::More; |
|---|
| 5 | use OpenGuides; |
|---|
| 6 | use OpenGuides::Test; |
|---|
| 7 | |
|---|
| 8 | plan tests => 3; |
|---|
| 9 | |
|---|
| 10 | my $config = OpenGuides::Test->make_basic_config; |
|---|
| 11 | $config->site_name('My site'); |
|---|
| 12 | $config->contact_email('me@example.com'); |
|---|
| 13 | my $guide = OpenGuides->new(config => $config); |
|---|
| 14 | |
|---|
| 15 | my $output = $guide->display_about(return_output => 1); |
|---|
| 16 | |
|---|
| 17 | like( $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 | |
|---|
| 24 | like( $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 | |
|---|
| 31 | like( $output, qr|<Project rdf:ID="OpenGuides">|ms, |
|---|
| 32 | "RDF about text is displayed"); |
|---|