Browse Source

Add "SuspendedAt" field to User struct.

griffin_stewie 10 years ago
committed by Will Norris
parent
commit
6387a9448d
2 changed files with 3 additions and 0 deletions
  1. +1
    -0
      github/users.go
  2. +2
    -0
      github/users_test.go

+ 1
- 0
github/users.go View File

@ -35,6 +35,7 @@ type User struct {
Following *int `json:"following,omitempty"`
CreatedAt *Timestamp `json:"created_at,omitempty"`
UpdatedAt *Timestamp `json:"updated_at,omitempty"`
SuspendedAt *Timestamp `json:"suspended_at,omitempty"`
Type *string `json:"type,omitempty"`
SiteAdmin *bool `json:"site_admin,omitempty"`
TotalPrivateRepos *int `json:"total_private_repos,omitempty"`


+ 2
- 0
github/users_test.go View File

@ -32,6 +32,7 @@ func TestUser_marshall(t *testing.T) {
Followers: Int(1),
Following: Int(1),
CreatedAt: &Timestamp{referenceTime},
SuspendedAt: &Timestamp{referenceTime},
}
want := `{
"login": "l",
@ -48,6 +49,7 @@ func TestUser_marshall(t *testing.T) {
"followers": 1,
"following": 1,
"created_at": ` + referenceTimeStr + `,
"suspended_at": ` + referenceTimeStr + `,
"url": "u"
}`
testJSONMarshal(t, u, want)


Loading…
Cancel
Save