Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/intercom/service/company.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require 'intercom/service/base_service'
require 'intercom/api_operations/delete'
require 'intercom/api_operations/list'
require 'intercom/api_operations/scroll'
require 'intercom/api_operations/find'
Expand All @@ -11,6 +12,7 @@
module Intercom
module Service
class Company < BaseService
include ApiOperations::Delete
include ApiOperations::Find
include ApiOperations::FindAll
include ApiOperations::Load
Expand Down
6 changes: 6 additions & 0 deletions spec/unit/intercom/company_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,10 @@
_(proxy.url).must_equal '/companies/1/contacts'
_(proxy.resource_class).must_equal Intercom::Contact
end

it "deletes a company" do
company = Intercom::Company.new("id" => "1")
client.expects(:delete).with("/companies/1", {})
client.companies.delete(company)
end
end