Skip to content

Commit 285c7f6

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

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import static org.hamcrest.MatcherAssert.assertThat;
66
import static org.hamcrest.Matchers.equalTo;
77
import static org.hamcrest.Matchers.is;
8+
import static org.junit.Assert.fail;
89

910
public class CustomFieldsTest {
1011

@@ -32,4 +33,10 @@ public void extractCustomFieldNameForStringWithEscapedColonValue() {
3233
assertThat(result, is(equalTo("This:is:a:field")));
3334
}
3435

36+
@Test(expected = SyntaxFormatException.class)
37+
public void extractCustomFieldNameForInvalidInput() {
38+
CustomFields.extractCustomFieldName("CUSTOMFIELD(ILLEGAL)");
39+
fail();
40+
}
41+
3542
}

0 commit comments

Comments
 (0)