Skip to content

Commit 23a7669

Browse files
committed
test: improve tests for custom field name logic
1 parent 8f49cd5 commit 23a7669

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

docs/changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ category: Administration
1717
* feat: ensure compatibility with Jira 10.4.0
1818
* refactor: use Java 16 syntax for lists
1919
* refactor: extract logic for custom field name syntax
20+
* test: improve tests for custom field name logic
2021

2122
### [24.11.0] - 2024-11-11
2223

src/test/java/de/codescape/jira/plugins/multiplesubtasks/model/CustomFieldsTest.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,14 @@ public void extractCustomFieldNameForAlphanumericValue() {
2222

2323
@Test
2424
public void extractCustomFieldNameForStringWithEscapedBracketsValue() {
25-
String result = CustomFields.extractCustomFieldName("customfield(Field(123\\))");
25+
String result = CustomFields.extractCustomFieldName("customfield(Field\\(123\\))");
2626
assertThat(result, is(equalTo("Field(123)")));
2727
}
2828

29+
@Test
30+
public void extractCustomFieldNameForStringWithEscapedColonValue() {
31+
String result = CustomFields.extractCustomFieldName("customfield(This\\:is\\:a\\:field)");
32+
assertThat(result, is(equalTo("This:is:a:field")));
33+
}
34+
2935
}

0 commit comments

Comments
 (0)