1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-08-12 09:00:54 +00:00

remove MsgTargetType and CacheType

This commit is contained in:
Kane York 2016-07-08 12:46:16 -07:00
parent 3b3457af14
commit ec932b1c36
5 changed files with 24 additions and 265 deletions

View file

@ -33,9 +33,7 @@ func TestSubscriptionAndPublish(t *testing.T) {
const TestData3 = false
var TestData4 = []interface{}{"str1", "str2", "str3"}
S2CCommandsCacheInfo[TestCommandChan] = PushCommandCacheInfo{Caching: CacheTypeLastOnly, Target: MsgTargetTypeChat}
S2CCommandsCacheInfo[TestCommandMulti] = PushCommandCacheInfo{Caching: CacheTypeLastOnly, Target: MsgTargetTypeMultichat}
S2CCommandsCacheInfo[TestCommandGlobal] = PushCommandCacheInfo{Caching: CacheTypeLastOnly, Target: MsgTargetTypeGlobal}
t.Log("TestSubscriptionAndPublish")
var server *httptest.Server
var urls TURLs
@ -195,7 +193,7 @@ func TestSubscriptionAndPublish(t *testing.T) {
// Publish message 4 - should go to clients 1, 2, 3
form, err = TSealForUncachedPubMsg(t, TestCommandGlobal, "", TestData4, MsgTargetTypeGlobal, false)
form, err = TSealForUncachedPubMsg(t, TestCommandGlobal, "", TestData4, "global", false)
if err != nil {
t.FailNow()
}
@ -254,6 +252,8 @@ func TestRestrictedCommands(t *testing.T) {
var server *httptest.Server
var urls TURLs
t.Log("TestRestrictedCommands")
var backendExpected = NewTBackendRequestChecker(t,
TExpectedBackendRequest{200, bPathAnnounceStartup, &url.Values{"startup": []string{"1"}}, "", nil},
TExpectedBackendRequest{401, fmt.Sprintf("%s%s", bPathOtherCommand, TestCommandNeedsAuth), &url.Values{"authenticated": []string{"0"}, "username": []string{""}, "clientData": []string{TestRequestDataJSON}}, "", nil},