Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
20 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
src/test/java/hudson/plugins/ircbot/v2/IRCColorizerTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package hudson.plugins.ircbot.v2; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
import org.junit.Test; | ||
import org.jvnet.hudson.test.Bug; | ||
import org.pircbotx.Colors; | ||
|
||
public class IRCColorizerTest { | ||
|
||
@Test | ||
@Bug(22360) | ||
public void shouldColorizeKeywords() { | ||
String message = "Build job123 is STILL FAILING: https://server.com/build/42"; | ||
String colorizedMessage = IRCColorizer.colorize(message); | ||
|
||
assertEquals("Build job123 is " + Colors.BOLD + Colors.RED + "STILL FAILING" + Colors.NORMAL + ": https://server.com/build/42", colorizedMessage); | ||
} | ||
|
||
} |