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