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:
parent
612e33ac17
commit
a8268e9088
1 changed files with 4 additions and 2 deletions
|
@ -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
|
Loading…
Reference in a new issue