~samwhited/xmpp

69dba8630398a523139cfa60e66f0e05baaf7947 — Sam Whited 5 years ago 40815eb
Fix tests broken by change in encoder flushing
2 files changed, 6 insertions(+), 0 deletions(-)

M sasl_test.go
M starttls_test.go
M sasl_test.go => sasl_test.go +3 -0
@@ 36,6 36,9 @@ func TestSASLList(t *testing.T) {
	case req != true:
		t.Error("Expected SASL to be a required feature")
	}
	if err = e.Flush(); err != nil {
		t.Fatal(err)
	}

	// Mechanisms should be printed exactly thus:
	if !bytes.Contains((&b).Bytes(), []byte(`<mechanism>PLAIN</mechanism>`)) {

M starttls_test.go => starttls_test.go +3 -0
@@ 33,6 33,9 @@ func TestStartTLSList(t *testing.T) {
		case r != req:
			t.Errorf("Expected StartTLS listing required to be %v but got %v", req, r)
		}
		if err = e.Flush(); err != nil {
			t.Fatal(err)
		}

		d := xml.NewDecoder(&b)
		tok, err := d.Token()