From 2d7363b9e3dd7b76972d9fa00446477421f35ed8 Mon Sep 17 00:00:00 2001 From: Jimmy Cuadra Date: Thu, 8 May 2014 02:25:36 -0700 Subject: [PATCH] Domain record create response key is record, not domain_record. --- lib/lita/handlers/digitalocean/domain_record.rb | 2 +- spec/lita/handlers/digitalocean/domain_record_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/lita/handlers/digitalocean/domain_record.rb b/lib/lita/handlers/digitalocean/domain_record.rb index c54a692..3f6b8e3 100644 --- a/lib/lita/handlers/digitalocean/domain_record.rb +++ b/lib/lita/handlers/digitalocean/domain_record.rb @@ -44,7 +44,7 @@ def create(response) client.domains.create_record(id, params) end or return - response.reply(t("domain_records.create.created", do_response[:domain_record])) + response.reply(t("domain_records.create.created", do_response[:record])) end def delete(response) diff --git a/spec/lita/handlers/digitalocean/domain_record_spec.rb b/spec/lita/handlers/digitalocean/domain_record_spec.rb index 3e3f057..d344e38 100644 --- a/spec/lita/handlers/digitalocean/domain_record_spec.rb +++ b/spec/lita/handlers/digitalocean/domain_record_spec.rb @@ -43,7 +43,7 @@ priority: "123", record_type: "srv", weight: "789" - ).and_return(status: "OK", domain_record: { id: 123 }) + ).and_return(status: "OK", record: { id: 123 }) send_command("do domain records create example.com srv @ --name foo --priority 123 --port 456 --weight 789") expect(replies.last).to eq("Created new DNS record: 123") end