Adding `VolumeLimit` to account.
This commit is contained in:
parent
ddc940d8ef
commit
6372129c8f
|
@ -24,6 +24,7 @@ var _ AccountService = &AccountServiceOp{}
|
|||
type Account struct {
|
||||
DropletLimit int `json:"droplet_limit,omitempty"`
|
||||
FloatingIPLimit int `json:"floating_ip_limit,omitempty"`
|
||||
VolumeLimit int `json:"volume_limit,omitempty"`
|
||||
Email string `json:"email,omitempty"`
|
||||
UUID string `json:"uuid,omitempty"`
|
||||
EmailVerified bool `json:"email_verified,omitempty"`
|
||||
|
|
|
@ -18,6 +18,7 @@ func TestAccountGet(t *testing.T) {
|
|||
{ "account": {
|
||||
"droplet_limit": 25,
|
||||
"floating_ip_limit": 25,
|
||||
"volume_limit": 22,
|
||||
"email": "sammy@digitalocean.com",
|
||||
"uuid": "b6fr89dbf6d9156cace5f3c78dc9851d957381ef",
|
||||
"email_verified": true
|
||||
|
@ -33,7 +34,7 @@ func TestAccountGet(t *testing.T) {
|
|||
}
|
||||
|
||||
expected := &Account{DropletLimit: 25, FloatingIPLimit: 25, Email: "sammy@digitalocean.com",
|
||||
UUID: "b6fr89dbf6d9156cace5f3c78dc9851d957381ef", EmailVerified: true}
|
||||
UUID: "b6fr89dbf6d9156cace5f3c78dc9851d957381ef", EmailVerified: true, VolumeLimit: 22}
|
||||
if !reflect.DeepEqual(acct, expected) {
|
||||
t.Errorf("Account.Get returned %+v, expected %+v", acct, expected)
|
||||
}
|
||||
|
@ -48,10 +49,11 @@ func TestAccountString(t *testing.T) {
|
|||
EmailVerified: true,
|
||||
Status: "active",
|
||||
StatusMessage: "message",
|
||||
VolumeLimit: 22,
|
||||
}
|
||||
|
||||
stringified := acct.String()
|
||||
expected := `godo.Account{DropletLimit:25, FloatingIPLimit:25, Email:"sammy@digitalocean.com", UUID:"b6fr89dbf6d9156cace5f3c78dc9851d957381ef", EmailVerified:true, Status:"active", StatusMessage:"message"}`
|
||||
expected := `godo.Account{DropletLimit:25, FloatingIPLimit:25, VolumeLimit:22, Email:"sammy@digitalocean.com", UUID:"b6fr89dbf6d9156cace5f3c78dc9851d957381ef", EmailVerified:true, Status:"active", StatusMessage:"message"}`
|
||||
if expected != stringified {
|
||||
t.Errorf("Account.String returned %+v, expected %+v", stringified, expected)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue