~samwhited/xmpp

ref: 8bbebffa4f4fda0dde5e4bf5a0f7082f84aded3b xmpp/config_test.go -rw-r--r-- 494 bytes
8bbebffaSam Whited Fix partially useless tests 3 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Copyright 2016 Sam Whited.
// Use of this source code is governed by the BSD 2-clause license that can be
// found in the LICENSE file.

package xmpp

import (
	"testing"
)

// New configs should populate the features map with no duplicates.
func TestNewConfigShouldPopulateFeatures(t *testing.T) {
	c := NewServerConfig(nil, nil, BindResource(), BindResource(), StartTLS(true))
	if len(c.Features) != 2 {
		t.Errorf("Expected two features (Bind and StartTLS) but got: %v", c.Features)
	}
}