-
Notifications
You must be signed in to change notification settings - Fork 311
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
43f27da
commit 4059082
Showing
2 changed files
with
18 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,7 @@ func TestAccountGet(t *testing.T) { | |
"reserved_ip_limit": 25, | ||
"volume_limit": 22, | ||
"email": "[email protected]", | ||
"name": "Sammy the Shark", | ||
"uuid": "b6fr89dbf6d9156cace5f3c78dc9851d957381ef", | ||
"email_verified": true | ||
} | ||
|
@@ -34,8 +35,16 @@ func TestAccountGet(t *testing.T) { | |
t.Errorf("Account.Get returned error: %v", err) | ||
} | ||
|
||
expected := &Account{DropletLimit: 25, FloatingIPLimit: 25, ReservedIPLimit: 25, Email: "[email protected]", | ||
UUID: "b6fr89dbf6d9156cace5f3c78dc9851d957381ef", EmailVerified: true, VolumeLimit: 22} | ||
expected := &Account{ | ||
DropletLimit: 25, | ||
FloatingIPLimit: 25, | ||
ReservedIPLimit: 25, | ||
Email: "[email protected]", | ||
Name: "Sammy the Shark", | ||
UUID: "b6fr89dbf6d9156cace5f3c78dc9851d957381ef", | ||
EmailVerified: true, | ||
VolumeLimit: 22, | ||
} | ||
if !reflect.DeepEqual(acct, expected) { | ||
t.Errorf("Account.Get returned %+v, expected %+v", acct, expected) | ||
} | ||
|
@@ -48,14 +57,15 @@ func TestAccountString(t *testing.T) { | |
ReservedIPLimit: 25, | ||
VolumeLimit: 22, | ||
Email: "[email protected]", | ||
Name: "Sammy the Shark", | ||
UUID: "b6fr89dbf6d9156cace5f3c78dc9851d957381ef", | ||
EmailVerified: true, | ||
Status: "active", | ||
StatusMessage: "message", | ||
} | ||
|
||
stringified := acct.String() | ||
expected := `godo.Account{DropletLimit:25, FloatingIPLimit:25, ReservedIPLimit:25, VolumeLimit:22, Email:"[email protected]", UUID:"b6fr89dbf6d9156cace5f3c78dc9851d957381ef", EmailVerified:true, Status:"active", StatusMessage:"message"}` | ||
expected := `godo.Account{DropletLimit:25, FloatingIPLimit:25, ReservedIPLimit:25, VolumeLimit:22, Email:"[email protected]", Name:"Sammy the Shark", UUID:"b6fr89dbf6d9156cace5f3c78dc9851d957381ef", EmailVerified:true, Status:"active", StatusMessage:"message"}` | ||
if expected != stringified { | ||
t.Errorf("\n got %+v\nexpected %+v", stringified, expected) | ||
} | ||
|
@@ -75,6 +85,7 @@ func TestAccountGetWithTeam(t *testing.T) { | |
"floating_ip_limit": 25, | ||
"volume_limit": 22, | ||
"email": "[email protected]", | ||
"name": "Sammy the Shark", | ||
"uuid": "b6fr89dbf6d9156cace5f3c78dc9851d957381ef", | ||
"email_verified": true, | ||
"team": { | ||
|
@@ -96,6 +107,7 @@ func TestAccountGetWithTeam(t *testing.T) { | |
DropletLimit: 25, | ||
FloatingIPLimit: 25, | ||
Email: "[email protected]", | ||
Name: "Sammy the Shark", | ||
UUID: "b6fr89dbf6d9156cace5f3c78dc9851d957381ef", | ||
EmailVerified: true, | ||
VolumeLimit: 22, | ||
|
@@ -116,6 +128,7 @@ func TestAccountStringWithTeam(t *testing.T) { | |
ReservedIPLimit: 25, | ||
VolumeLimit: 22, | ||
Email: "[email protected]", | ||
Name: "Sammy the Shark", | ||
UUID: "b6fr89dbf6d9156cace5f3c78dc9851d957381ef", | ||
EmailVerified: true, | ||
Status: "active", | ||
|
@@ -127,7 +140,7 @@ func TestAccountStringWithTeam(t *testing.T) { | |
} | ||
|
||
stringified := acct.String() | ||
expected := `godo.Account{DropletLimit:25, FloatingIPLimit:25, ReservedIPLimit:25, VolumeLimit:22, Email:"[email protected]", UUID:"b6fr89dbf6d9156cace5f3c78dc9851d957381ef", EmailVerified:true, Status:"active", StatusMessage:"message", Team:godo.TeamInfo{Name:"My Team", UUID:"b6fr89dbf6d9156cace5f3c78dc9851d957381ef"}}` | ||
expected := `godo.Account{DropletLimit:25, FloatingIPLimit:25, ReservedIPLimit:25, VolumeLimit:22, Email:"[email protected]", Name:"Sammy the Shark", UUID:"b6fr89dbf6d9156cace5f3c78dc9851d957381ef", EmailVerified:true, Status:"active", StatusMessage:"message", Team:godo.TeamInfo{Name:"My Team", UUID:"b6fr89dbf6d9156cace5f3c78dc9851d957381ef"}}` | ||
if expected != stringified { | ||
t.Errorf("\n got %+v\nexpected %+v", stringified, expected) | ||
} | ||
|