Skip to content

Commit

Permalink
Review zone records for attribute default value
Browse files Browse the repository at this point in the history
  • Loading branch information
jacegu committed Mar 8, 2016
1 parent 13630e2 commit 393eb66
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/dnsimple/client/zones_records.rb
Expand Up @@ -58,7 +58,7 @@ def all_records(account_id, zone_id, options = {})
# @return [Dnsimple::Response<Dnsimple::Struct::Record>]
#
# @raise [Dnsimple::RequestError]
def create_record(account_id, zone_id, attributes = {}, options = {})
def create_record(account_id, zone_id, attributes, options = {})
Extra.validate_mandatory_attributes(attributes, [:type, :name, :content])
response = client.post(Client.versioned("/%s/zones/%s/records" % [account_id, zone_id]), attributes, options)

Expand Down Expand Up @@ -96,7 +96,7 @@ def record(account_id, zone_id, record_id, options = {})
#
# @raise [Dnsimple::NotFoundError]
# @raise [Dnsimple::RequestError]
def update_record(account_id, zone_id, record_id, attributes = {}, options = {})
def update_record(account_id, zone_id, record_id, attributes, options = {})
response = client.patch(Client.versioned("/%s/zones/%s/records/%s" % [account_id, zone_id, record_id]), attributes, options)

Dnsimple::Response.new(response, Struct::Record.new(response["data"]))
Expand All @@ -117,7 +117,7 @@ def update_record(account_id, zone_id, record_id, attributes = {}, options = {})
# @raise [Dnsimple::NotFoundError]
# @raise [Dnsimple::RequestError]
def delete_record(account_id, zone_id, record_id, options = {})
response = client.delete(Client.versioned("/%s/zones/%s/records/%s" % [account_id, zone_id, record_id]), {}, options)
response = client.delete(Client.versioned("/%s/zones/%s/records/%s" % [account_id, zone_id, record_id]), nil, options)

Dnsimple::Response.new(response, nil)
end
Expand Down
2 changes: 1 addition & 1 deletion spec/dnsimple/client/zones_records_spec.rb
Expand Up @@ -196,7 +196,7 @@
end

it "returns the record" do
response = subject.update_record(account_id, zone_id, 2)
response = subject.update_record(account_id, zone_id, 2, attributes)
expect(response).to be_a(Dnsimple::Response)

result = response.data
Expand Down

0 comments on commit 393eb66

Please sign in to comment.