This repository has been archived by the owner on Dec 17, 2024. It is now read-only.
forked from containrrr/shoutrrr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added custom port option for rocketchat (containrrr#80)
- Loading branch information
Showing
4 changed files
with
24 additions
and
7 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
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
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
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 |
---|---|---|
|
@@ -162,5 +162,14 @@ var _ = Describe("the rocketchat service", func() { | |
Expect(string(json)).To(Equal("{\"text\":\"this is a message\",\"username\":\"overwriteUserName\",\"channel\":\"overwriteChannel\"}")) | ||
}) | ||
}) | ||
When("sending to an URL which contains HOST:PORT", func() { | ||
rocketchatURL, _ := url.Parse("rocketchat://[email protected]:5055/tokenA/tokenB/testChannel") | ||
config := &Config{} | ||
config.SetURL(rocketchatURL) | ||
It("should generate a correct hook URL https://HOST:PORT", func() { | ||
hookURL := buildURL(config) | ||
Expect(hookURL).To(ContainSubstring("my-domain.com:5055")) | ||
}) | ||
}) | ||
}) | ||
}) |