#!/usr/bin/env perl -w use strict; use Test::More tests => 9; require 'prettify_hipchat.pl'; my $title_message = <<'END_MESSAGE'; SC-1000 : Some kind of issue text that is kind of long and describes the problem that we saw during testing. https://somecompany.atlassian.net/browse/SC-2169 Created by Person Name END_MESSAGE is(prettify_hipchat(' SC-1000 : Some kind of issue text that is kind of long and describes the problem that we saw during testing. Created by Person Name
'), $title_message, 'Title, link, and creator'); is(prettify_hipchat('Type:  Bug  '), 'Type: Bug', 'Type'); is(prettify_hipchat(' Priority:  '), 'Priority:', 'Priority label'); is(prettify_hipchat(' Not prioritized  '), 'Not prioritized', 'Priority tag body'); is(prettify_hipchat('Status:  '), 'Status:', 'Status label'); is(prettify_hipchat(' '), '', ''); is(prettify_hipchat(' To Do'), 'To Do', 'To Do'); is(prettify_hipchat(' '), '', ''); is(prettify_hipchat('
'), '', '
');