mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
* Revert "PLT-5765 Passed SiteURL to SendNotifications (#5705)"
This reverts commit a8e68bd890.
* Removed automatic configuration of SiteURL
* Reverted unintentional config changes
* Updated help text
* Added link to docs in Site URL warning
* Fixed merge conflict
30 lines
535 B
Go
30 lines
535 B
Go
// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
|
|
// See License.txt for license information.
|
|
|
|
package api
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestSiteURLHeader(t *testing.T) {
|
|
c := &Context{}
|
|
|
|
testCases := []struct {
|
|
url string
|
|
want string
|
|
}{
|
|
{"http://mattermost.com/", "http://mattermost.com"},
|
|
{"http://mattermost.com", "http://mattermost.com"},
|
|
}
|
|
|
|
for _, tc := range testCases {
|
|
c.SetSiteURLHeader(tc.url)
|
|
|
|
if c.siteURLHeader != tc.want {
|
|
t.Fatalf("expected %s, got %s", tc.want, c.siteURLHeader)
|
|
}
|
|
}
|
|
|
|
}
|