Fixes issue with unescaped character %

Fixes #113
This commit is contained in:
Mickael Remond
2019-09-27 16:30:12 +02:00
committed by Mickaël Rémond
parent 2cdda48467
commit 005c8823d9
2 changed files with 24 additions and 4 deletions
+19
View File
@@ -0,0 +1,19 @@
package xmpp
import (
"bytes"
"testing"
)
func TestClient_Send(t *testing.T) {
buffer := bytes.NewBufferString("")
client := Client{}
data := []byte("https://da.wikipedia.org/wiki/J%C3%A6vnd%C3%B8gn")
if err := client.sendWithWriter(buffer, data); err != nil {
t.Errorf("Writing failed: %v", err)
}
if buffer.String() != string(data) {
t.Errorf("Incorrect value sent to buffer: '%s'", buffer.String())
}
}