Sha256: 2827e60fbf5a9d016a6580effca6acbfc28637d26c20e9b09e42ca561b958801

Contents?: true

Size: 423 Bytes

Versions: 24

Compression:

Stored size: 423 Bytes

Contents

require 'core/spec_helper'

describe ZendeskAPI::Middleware::Response::Callback do
  let(:response) { "TEST" }

  before(:each) do
    client.insert_callback do |env|
      env[:body] = response
    end

    stub_request(:get, %r{test_endpoint}).to_return(:body => MultiJson.dump({ "ABC" => "DEF" }))
  end

  it "should call callbacks " do
    expect(client.connection.get("test_endpoint").body).to eq(response)
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
zendesk_api-1.9.6 spec/core/middleware/response/callback_spec.rb
zendesk_api-1.9.5 spec/core/middleware/response/callback_spec.rb
zendesk_api-1.9.4 spec/core/middleware/response/callback_spec.rb
zendesk_api-1.9.3 spec/core/middleware/response/callback_spec.rb
zendesk_api-1.9.2 spec/core/middleware/response/callback_spec.rb
zendesk_api-1.9.1 spec/core/middleware/response/callback_spec.rb
zendesk_api-1.9.0 spec/core/middleware/response/callback_spec.rb
zendesk_api-1.8.0 spec/core/middleware/response/callback_spec.rb
zendesk_api-1.7.4 spec/core/middleware/response/callback_spec.rb
zendesk_api-1.7.3 spec/core/middleware/response/callback_spec.rb
zendesk_api-1.7.1 spec/core/middleware/response/callback_spec.rb
zendesk_api-1.7.0 spec/core/middleware/response/callback_spec.rb
zendesk_api-1.6.3 spec/core/middleware/response/callback_spec.rb
zendesk_api-1.6.2 spec/core/middleware/response/callback_spec.rb
zendesk_api-1.6.1 spec/core/middleware/response/callback_spec.rb
zendesk_api-1.6.0 spec/core/middleware/response/callback_spec.rb
zendesk_api-1.5.1 spec/core/middleware/response/callback_spec.rb
zendesk_api-1.5.0 spec/core/middleware/response/callback_spec.rb
zendesk_api-1.4.6 spec/core/middleware/response/callback_spec.rb
zendesk_api-1.4.5 spec/core/middleware/response/callback_spec.rb