Skip to content

Commit

Permalink
Fixing misnaming of methods for mock classes in compute v2 digitalocean
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Gross committed Sep 23, 2015
1 parent 3086f46 commit 5cc840c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/fog/digitalocean/requests/compute_v2/create_ssh_key.rb
Expand Up @@ -26,7 +26,7 @@ def create_ssh_key(name, public_key)

# noinspection RubyStringKeysInHashInspection
class Mock
def create_server(name, public_key)
def create_ssh_key(name, public_key)
response = Excon::Response.new
response.status = 202

Expand Down
6 changes: 4 additions & 2 deletions lib/fog/digitalocean/requests/compute_v2/delete_server.rb
Expand Up @@ -18,9 +18,11 @@ def delete_server(server_id)
# noinspection RubyStringKeysInHashInspection
class Mock
def delete_server(_)
response(:status => 204)
response = Excon::Response.new
response.status = 204
response
end
end
end
end
end
end
7 changes: 4 additions & 3 deletions lib/fog/digitalocean/requests/compute_v2/delete_ssh_key.rb
Expand Up @@ -18,9 +18,10 @@ def delete_ssh_key(id)
# noinspection RubyStringKeysInHashInspection
class Mock
def delete_ssh_key(_)
response(:status => 204)
end
response = Excon::Response.new
response.status = 204
response end
end
end
end
end
end
2 changes: 1 addition & 1 deletion lib/fog/digitalocean/requests/compute_v2/list_regions.rb
Expand Up @@ -13,7 +13,7 @@ def list_regions

# noinspection RubyStringKeysInHashInspection
class Mock
def list_images
def list_regions
response = Excon::Response.new
response.status = 200
response.body = {
Expand Down
2 changes: 1 addition & 1 deletion lib/fog/digitalocean/requests/compute_v2/update_ssh_key.rb
Expand Up @@ -25,7 +25,7 @@ def update_ssh_key(key_id, name)

# noinspection RubyStringKeysInHashInspection
class Mock
def update_server(key_id, name)
def update_ssh_key(key_id, name)
response = Excon::Response.new
response.status = 200

Expand Down

0 comments on commit 5cc840c

Please sign in to comment.