diff --git a/lib/fog/dnsimple/requests/dns/get_domain.rb b/lib/fog/dnsimple/requests/dns/get_domain.rb index 53300e440..a3f320810 100644 --- a/lib/fog/dnsimple/requests/dns/get_domain.rb +++ b/lib/fog/dnsimple/requests/dns/get_domain.rb @@ -36,7 +36,9 @@ module Fog class Mock def get_domain(id) - domain = self.data[:domains].detect { |domain| domain["domain"]["id"] == id } + domain = self.data[:domains].detect do |domain| + domain["domain"]["id"] == id || domain["domain"]["name"] == id + end response = Excon::Response.new response.status = 200 response.body = domain @@ -46,4 +48,4 @@ module Fog end end end -end +end \ No newline at end of file