~samwhited/xmpp

ref: de40e6f9107a5d25ae8c8edad9289fd0c4b12e2f xmpp/s2s/bidi_test.go -rw-r--r-- 600 bytes
de40e6f9Sam Whited roster: add type to IQ response in test 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[:])
}