aboutsummaryrefslogtreecommitdiffstats
path: root/t/open311.t
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2018-04-17 12:31:04 +0100
committerStruan Donald <struan@exo.org.uk>2018-04-17 13:41:32 +0100
commitf65ecc75c0899b027ad549d92dc28311c313b2d0 (patch)
tree1a9fce7d86efa380831b6628bf7c577c38fdbefb /t/open311.t
parente03c3f4251e12043dcdb5497885e18e10bca8782 (diff)
[Open311] correctly handle one word names when splitting
If a name only had a single word we were failing to split it and not setting `first_name`. Also refactor splitting out to a function so the regex is only in one place.
Diffstat (limited to 't/open311.t')
-rw-r--r--t/open311.t6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/open311.t b/t/open311.t
index 35d9b0ecb..ce18a6d0c 100644
--- a/t/open311.t
+++ b/t/open311.t
@@ -196,6 +196,12 @@ for my $test (
first_name => 'Nom',
last_name => 'de Report',
},
+ {
+ desc => 'Check single word name handled correctly',
+ name => 'Nom',
+ first_name => 'Nom',
+ last_name => '',
+ }
) {
subtest $test->{desc} => sub {
$problem->extra( undef );