Sha256: 5c6d60a28ce296712556e0dc618157c9ea0c7724b094764af2b91767d5f9a695

Contents?: true

Size: 418 Bytes

Versions: 36

Compression:

Stored size: 418 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
    client.connection.get("test_endpoint").body.should == response
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
zendesk_api-1.3.9 spec/core/middleware/response/callback_spec.rb
zendesk_api-1.3.8 spec/core/middleware/response/callback_spec.rb
zendesk_api-1.3.7 spec/core/middleware/response/callback_spec.rb
zendesk_api-1.2.10 spec/core/middleware/response/callback_spec.rb
zendesk_api-1.2.9 spec/core/middleware/response/callback_spec.rb
zendesk_api-1.2.8 spec/core/middleware/response/callback_spec.rb
zendesk_api-1.3.5 spec/core/middleware/response/callback_spec.rb
zendesk_api-1.2.7 spec/core/middleware/response/callback_spec.rb
zendesk_api-1.3.4 spec/core/middleware/response/callback_spec.rb
zendesk_api-1.3.2 spec/core/middleware/response/callback_spec.rb
zendesk_api-1.3.1 spec/core/middleware/response/callback_spec.rb
zendesk_api-1.3.0 spec/core/middleware/response/callback_spec.rb
zendesk_api-1.3.0.rc3 spec/core/middleware/response/callback_spec.rb
zendesk_api-1.2.6 spec/core/middleware/response/callback_spec.rb
zendesk_api-1.3.0.rc2 spec/core/middleware/response/callback_spec.rb
zendesk_api-1.3.0.rc1 spec/core/middleware/response/callback_spec.rb
zendesk_api-1.2.5 spec/core/middleware/response/callback_spec.rb
zendesk_api-1.2.4 spec/core/middleware/response/callback_spec.rb
zendesk_api-1.2.3 spec/core/middleware/response/callback_spec.rb
zendesk_api-1.2.2 spec/core/middleware/response/callback_spec.rb