Skip to content

Commit

Permalink
Add DeleteRelationshipRequest specs
Browse files Browse the repository at this point in the history
  • Loading branch information
therubymug committed Jul 25, 2012
1 parent c4b3997 commit 5e46340
Show file tree
Hide file tree
Showing 4 changed files with 448 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/keymaker/requests/delete_relationship_request.rb
Expand Up @@ -9,7 +9,16 @@ module Keymaker
class DeleteRelationshipRequest < Request

def submit
service.delete(relationship_path(opts[:relationship_id]))
service.delete(relationship_path(opts[:relationship_id])).on_error do |response|
case response.status
when 404
raise ResourceNotFound.new(response, response.body)
when (400..499)
raise ClientError.new(response, response.body)
when (500..599)
raise ServerError.new(response, response.body)
end
end
end

end
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5e46340

Please sign in to comment.