~samwhited/xmpp

ref: 9e167719f2a8302e0694db8a93cc139ab25f5fb6 xmpp/s2s/bidi_test.go -rw-r--r-- 600 bytes
9e167719Sam Whited xmpp: simplify xml wrapping 10 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright 2020 The Mellium Contributors.
// Use of this source code is governed by the BSD 2-clause
// license that can be found in the LICENSE file.

package s2s_test

import (
	"testing"

	"mellium.im/xmpp"
	"mellium.im/xmpp/internal/xmpptest"
	"mellium.im/xmpp/s2s"
)

var bidiTestCases = [...]xmpptest.FeatureTestCase{
	0: {
		State:   xmpp.Received,
		Feature: s2s.Bidi(),
		In:      `<bidi xmlns="urn:xmpp:bidi"></bidi>`,
	},
	1: {
		Feature: s2s.Bidi(),
		Out:     `<bidi xmlns="urn:xmpp:bidi"></bidi>`,
	},
}

func TestBidi(t *testing.T) {
	xmpptest.RunFeatureTests(t, bidiTestCases[:])
}