go-sdk/gitea/settings_test.go
6543 9be8754fec Add Function to get GetGlobalSettings and GetSettingAllowedReactions (#359)
Add Function to get GetGlobalSettings and GetSettingAllowedReactions

Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/359
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: techknowlogick <techknowlogick@gitea.io>
2020-06-09 00:19:14 +00:00

22 lines
608 B
Go

// Copyright 2020 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package gitea
import (
"log"
"testing"
"github.com/stretchr/testify/assert"
)
func TestGetGlobalSettings(t *testing.T) {
log.Println("== TestGetGlobalSettings ==")
c := newTestClient()
settings, err := c.GetGlobalSettings()
assert.NoError(t, err)
expectedAllowedReactions := []string{"+1", "-1", "laugh", "hooray", "confused", "heart", "rocket", "eyes"}
assert.ElementsMatch(t, expectedAllowedReactions, settings.AllowedReactions)
}