Skip to content

Commit

Permalink
Check link with leading /
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkEWaite committed May 11, 2024
1 parent a13d3c3 commit 68f6268
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,14 @@ void createShortText(@SuppressWarnings("unused") JenkinsRule r) {
assertEquals("", action.getUrlName());
}

@Test
void createShortTextWithAllArgs(@SuppressWarnings("unused") JenkinsRule r) {
BadgeAction action = BadgeAction.createShortText("Short text badge", "red", "black", "blue", "green", "/link");
assertEquals("/link", action.getLink());
assertNull(action.getIconFileName());
assertTrue(action.isTextOnly());
}

@Test
void createBadgeWithInvalidLink(@SuppressWarnings("unused") JenkinsRule r) {
String invalidLink = "invalid-link";
Expand Down

0 comments on commit 68f6268

Please sign in to comment.