diff options
author | Matthew Somerville <matthew@mysociety.org> | 2019-08-29 13:04:13 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2019-08-29 13:04:13 +0100 |
commit | a5336887af2d62ad0accdb39da3d22192a312c07 (patch) | |
tree | 06d9b5f8b8226499c6780c92e84fe42044056417 /t/open311/populate-service-list.t | |
parent | 76c68d6da913c082206ac3dc070ed7eb5695e388 (diff) | |
parent | 027f1b20a4a6b9c9b9e02b2f2b5e83aa49a335df (diff) |
Merge branch 'issues/commercial/1514-extra-data-protected'
Diffstat (limited to 't/open311/populate-service-list.t')
-rw-r--r-- | t/open311/populate-service-list.t | 128 |
1 files changed, 128 insertions, 0 deletions
diff --git a/t/open311/populate-service-list.t b/t/open311/populate-service-list.t index 9f8b4d9f0..3d3144d1f 100644 --- a/t/open311/populate-service-list.t +++ b/t/open311/populate-service-list.t @@ -606,6 +606,134 @@ for my $test ( ', }, { + desc => 'check protected meta data not overwritten', + has_meta => 1, + end_meta => [ { + variable => 'true', + code => 'type', + datatype => 'string', + required => 'true', + datatype_description => 'Bin type', + order => 1, + description => 'Bin type', + protected => 'true' + + } ], + orig_meta => [ { + variable => 'true', + code => 'type', + datatype => 'string', + required => 'true', + datatype_description => 'Bin type', + order => 1, + description => 'Bin type', + protected => 'true' + + } ], + meta_xml => '<?xml version="1.0" encoding="utf-8"?> + <service_definition> + <service_code>100</service_code> + <attributes> + <attribute> + <variable>true</variable> + <code>type</code> + <datatype>string</datatype> + <required>true</required> + <datatype_description>Type of bin</datatype_description> + <order>1</order> + <description>Type of bin</description> + </attribute> + </attributes> + </service_definition> + ', + }, + { + desc => 'check protected meta data retained', + has_meta => 1, + end_meta => [ + { + variable => 'true', + code => 'type2', + datatype => 'string', + required => 'true', + datatype_description => 'Type of bin', + order => 1, + description => 'Type of bin', + + }, + { + variable => 'true', + code => 'type', + datatype => 'string', + required => 'true', + datatype_description => 'Number of bin', + order => 1, + description => 'Number of bin', + protected => 'true' + }, + ], + orig_meta => [ { + variable => 'true', + code => 'type', + datatype => 'string', + required => 'true', + datatype_description => 'Number of bin', + order => 1, + description => 'Number of bin', + protected => 'true' + + } ], + meta_xml => '<?xml version="1.0" encoding="utf-8"?> + <service_definition> + <service_code>100</service_code> + <attributes> + <attribute> + <variable>true</variable> + <code>type2</code> + <datatype>string</datatype> + <required>true</required> + <datatype_description>Type of bin</datatype_description> + <order>1</order> + <description>Type of bin</description> + </attribute> + </attributes> + </service_definition> + ', + }, + { + desc => 'check protected meta data retained on removal of all Open311 extras', + end_meta => [ + { + variable => 'true', + code => 'type', + datatype => 'string', + required => 'true', + datatype_description => 'Number of bin', + order => 1, + description => 'Number of bin', + protected => 'true' + }, + ], + orig_meta => [ { + variable => 'true', + code => 'type', + datatype => 'string', + required => 'true', + datatype_description => 'Number of bin', + order => 1, + description => 'Number of bin', + protected => 'true' + + } ], + meta_xml => '<?xml version="1.0" encoding="utf-8"?> + <service_definition> + <service_code>100</service_code> + <attributes> + </attributes> + </service_definition> + ', + }, + { desc => 'check empty meta data handled', has_meta => 1, orig_meta => [], |