Skip to content

Commit

Permalink
account: add 'name' field in response
Browse files Browse the repository at this point in the history
  • Loading branch information
bentranter committed Jul 18, 2023
1 parent eb4a3de commit ba810da
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/droplet_kit/mappings/account_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class AccountMapping
scoped :read do
property :droplet_limit
property :floating_ip_limit
property :name
property :email
property :uuid
property :email_verified
Expand Down
1 change: 1 addition & 0 deletions lib/droplet_kit/models/account.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module DropletKit
class Account < BaseModel
attribute :droplet_limit
attribute :floating_ip_limit
attribute :name
attribute :email
attribute :uuid
attribute :email_verified
Expand Down
3 changes: 2 additions & 1 deletion spec/fixtures/account/info.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"account": {
"droplet_limit": 200,
"name": "Sammy the Shark",
"email": "[email protected]",
"uuid": "alksdjfhlakjdsfh12983712",
"email_verified": true
}
}
}
1 change: 1 addition & 0 deletions spec/lib/droplet_kit/resources/account_resource_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
expect(account_info.droplet_limit).to eq(parsed['account']['droplet_limit'])
expect(account_info.floating_ip_limit).to eq(parsed['account']['floating_ip_limit'])
expect(account_info.email).to eq(parsed['account']['email'])
expect(account_info.email).to eq(parsed['account']['email'])
expect(account_info.uuid).to eq(parsed['account']['uuid'])
expect(account_info.email_verified).to eq(parsed['account']['email_verified'])
end
Expand Down

0 comments on commit ba810da

Please sign in to comment.