Sha256: 96e777428e49afc51e4b054615567094db433c67480e3f638a658d1a5527f951

Contents?: true

Size: 1.05 KB

Versions: 9

Compression:

Stored size: 1.05 KB

Contents

describe ChatWork::Client::IncomingRequestMethods do
  describe "#get_incoming_requests", type: :api do
    subject { client.get_incoming_requests(&block) }

    before do
      stub_chatwork_request(:get, "/incoming_requests")
    end

    it_behaves_like :a_chatwork_api, :get, "/incoming_requests"
  end

  describe "#update_incoming_request", type: :api do
    subject { client.update_incoming_request(request_id: request_id, &block) }

    let(:request_id) { 123 }

    before do
      stub_chatwork_request(:put, "/incoming_requests/#{request_id}", "/incoming_requests/{request_id}")
    end

    it_behaves_like :a_chatwork_api, :put, "/incoming_requests/{request_id}"
  end

  describe "#destroy_incoming_request", type: :api do
    subject { client.destroy_incoming_request(request_id: request_id, &block) }

    let(:request_id) { 123 }

    before do
      stub_chatwork_request(:delete, "/incoming_requests/#{request_id}", "/incoming_requests/{request_id}", 204)
    end

    it_behaves_like :a_chatwork_api, :delete, "/incoming_requests/{request_id}", 204
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
chatwork-1.0.0 spec/lib/chatwork/client/incoming_request_methods_spec.rb
chatwork-0.12.3 spec/lib/chatwork/client/incoming_request_methods_spec.rb
chatwork-0.12.2 spec/lib/chatwork/client/incoming_request_methods_spec.rb
chatwork-0.12.1 spec/lib/chatwork/client/incoming_request_methods_spec.rb
chatwork-0.12.0 spec/lib/chatwork/client/incoming_request_methods_spec.rb
chatwork-0.11.0 spec/lib/chatwork/client/incoming_request_methods_spec.rb
chatwork-0.10.0 spec/lib/chatwork/client/incoming_request_methods_spec.rb
chatwork-0.9.0 spec/lib/chatwork/client/incoming_request_methods_spec.rb
chatwork-0.8.0 spec/lib/chatwork/client/incoming_request_methods_spec.rb