Commit 06b7cc07e52758dc899830623e23733a2767bb58
1 parent
d3262a8c
Exists in
master
and in
2 other branches
add more simple tests
Showing
2 changed files
with
5 additions
and
2 deletions
Show diff stats
lib/CoprStatus.pm
@@ -103,7 +103,7 @@ sub info2html { | @@ -103,7 +103,7 @@ sub info2html { | ||
103 | 103 | ||
104 | sub build_html { | 104 | sub build_html { |
105 | my $data = { | 105 | my $data = { |
106 | - title => "SPB Copr Stats", | 106 | + title => "SPB Copr Status", |
107 | table_entries => info2html() | 107 | table_entries => info2html() |
108 | }; | 108 | }; |
109 | 109 |
t/app.t
@@ -22,6 +22,9 @@ foreach my $key (keys %{$match}) { | @@ -22,6 +22,9 @@ foreach my $key (keys %{$match}) { | ||
22 | like($match->{$key}, qr/1|0/); | 22 | like($match->{$key}, qr/1|0/); |
23 | } | 23 | } |
24 | 24 | ||
25 | -# TODO: test info2html() and build_html() | 25 | +my $table = CoprStatus::info2html(); |
26 | +like($table, qr/danger|success/m); | ||
27 | +my $html = CoprStatus::build_html(); | ||
28 | +like($html, qr/SPB Copr Status/m); | ||
26 | 29 | ||
27 | done_testing(); | 30 | done_testing(); |