1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

DNSimple get_domain also accepts domain name

As the real DNSimple behaviour, get_domain also accept a string argument.
This commit is contained in:
Jose Luis Salas 2014-01-11 18:55:08 +01:00
parent 612e33ac17
commit a8268e9088

View file

@ -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