Skip to content

Commit

Permalink
Merge pull request #75 from aetrion/bugfix/type-vs-record-type
Browse files Browse the repository at this point in the history
Record type should be :type not :record_type
  • Loading branch information
weppos committed Feb 26, 2016
2 parents 9fe81b3 + 60e4853 commit c9b231b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/dnsimple/client/zones_records.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def all_records(account_id, zone_id, options = {})
#
# @raise [Dnsimple::RequestError]
def create_record(account_id, zone_id, attributes = {}, options = {})
Extra.validate_mandatory_attributes(attributes, [:record_type, :name, :content])
Extra.validate_mandatory_attributes(attributes, [:type, :name, :content])
options = options.merge(attributes)
response = client.post(Client.versioned("/%s/zones/%s/records" % [account_id, zone_id]), options)

Expand Down
2 changes: 1 addition & 1 deletion spec/dnsimple/client/zones_records_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
.to_return(read_http_fixture("createZoneRecord/created.http"))
end

let(:attributes) { { record_type: "A", name: "www", content: "127.0.0.1" } }
let(:attributes) { { type: "A", name: "www", content: "127.0.0.1" } }

it "builds the correct request" do
subject.create_record(account_id, zone_id, attributes)
Expand Down

0 comments on commit c9b231b

Please sign in to comment.