Skip to content

Commit 2ed16ea

Browse files
committed
Updating the API from setChannel to sendToChannel
1 parent b5ac253 commit 2ed16ea

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/java/in/ashwanthkumar/slack/webhook/Slack.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public Slack(String webhookUrl) {
3636
*
3737
* @param channel Channel to send
3838
*/
39-
public Slack setChannel(String channel) {
39+
public Slack sendToChannel(String channel) {
4040
this.channel = "#" + channel;
4141
return this;
4242
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public void shouldSetChannelWithHashPrefix() throws IOException {
2020
ArgumentCaptor<String> channelCaptor = ArgumentCaptor.forClass(String.class);
2121
SlackMessage message = new SlackMessage("hello");
2222
doNothing().when(slackService).push(anyString(), eq(message), anyString(), anyString(), channelCaptor.capture());
23-
slack.setChannel("dev-group").push(message);
23+
slack.sendToChannel("dev-group").push(message);
2424
assertThat(channelCaptor.getValue(), is("#dev-group"));
2525
}
2626

0 commit comments

Comments
 (0)