Make test simpler

This commit is contained in:
Kegan Dougal 2016-12-02 15:38:31 +00:00
parent cc1e3f782c
commit 8d48eee7bb
1 changed files with 2 additions and 5 deletions

View File

@ -38,15 +38,12 @@ func TestClient_StateEvent(t *testing.T) {
content := struct {
Name string `json:"name"`
}{}
expectContent := struct {
Name string `json:"name"`
}{"Room Name Goes Here"}
if err := cli.StateEvent("!foo:bar", "m.room.name", "", &content); err != nil {
t.Fatalf("StateEvent: error, got %s", err.Error())
}
if content.Name != expectContent.Name {
t.Fatalf("StateEvent: got %s, want %s", content.Name, expectContent.Name)
if content.Name != "Room Name Goes Here" {
t.Fatalf("StateEvent: got %s, want %s", content.Name, "Room Name Goes Here")
}
}