Skip to content

Commit e437bfe

Browse files
committed
more tests to Slack
1 parent 2ed16ea commit e437bfe

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/test/java/in/ashwanthkumar/slack/webhook/SlackTest.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,14 @@ public void shouldSetUserWithAtTheRateOfPrefix() throws IOException {
3434
assertThat(channelCaptor.getValue(), is("@slackbot"));
3535
}
3636

37+
@Test(expected = IllegalArgumentException.class)
38+
public void shouldThrowIllegaArgumentExceptionWhenWebHookUrlIsNotGiven() {
39+
new Slack(null);
40+
}
41+
42+
@Test(expected = IllegalArgumentException.class)
43+
public void shouldThrowIllegalArgumentExceptionWhenUrlIsNotInSlacWebHookFormat() {
44+
new Slack("http://www.foo.com/webhooks");
45+
}
46+
3747
}

0 commit comments

Comments
 (0)