Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
mattn committed Nov 30, 2017
1 parent 83242d9 commit a98b28c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func TestRegisterApp(t *testing.T) {
fmt.Fprintln(w, `<html><head><title>Apps</title></head></html>`)
return
}
fmt.Fprintln(w, `{"client_id": "foo", "client_secret": "bar"}`)
fmt.Fprintln(w, `{"id": 123, "client_id": "foo", "client_secret": "bar"}`)
return
}))
defer ts.Close()
Expand Down Expand Up @@ -64,6 +64,9 @@ func TestRegisterApp(t *testing.T) {
if err != nil {
t.Fatalf("should not be fail: %v", err)
}
if string(app.ID) != "123" {
t.Fatalf("want %q but %q", "bar", app.ClientSecret)
}
if app.ClientID != "foo" {
t.Fatalf("want %q but %q", "foo", app.ClientID)
}
Expand Down

0 comments on commit a98b28c

Please sign in to comment.