Files
mattermost/api/context_test.go
Harrison Healey c7bdce8a66 PLT-5900 Removed automatic configuration of SiteURL (#5952)
* 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
2017-04-04 11:54:52 -04:00

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)
}
}
}