Sha256: a293b93d519e72d5266a05b798b4353d0d1a5a7fc6db4553ddf70e892b15c079

Contents?: true

Size: 413 Bytes

Versions: 20

Compression:

Stored size: 413 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 => JSON.dump({ "ABC" => "DEF" }))
  end

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

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
zendesk_api-0.3.14 spec/core/middleware/response/callback_spec.rb
zendesk_api-0.3.13 spec/core/middleware/response/callback_spec.rb
zendesk_api-0.3.12 spec/core/middleware/response/callback_spec.rb
zendesk_api-0.3.11 spec/core/middleware/response/callback_spec.rb
zendesk_api-0.3.10 spec/core/middleware/response/callback_spec.rb
zendesk_api-0.3.9 spec/core/middleware/response/callback_spec.rb
zendesk_api-0.3.8 spec/core/middleware/response/callback_spec.rb
zendesk_api-0.3.7 spec/core/middleware/response/callback_spec.rb
zendesk_api-0.3.6 spec/core/middleware/response/callback_spec.rb
zendesk_api-0.3.5 spec/core/middleware/response/callback_spec.rb
zendesk_api-0.3.4 spec/core/middleware/response/callback_spec.rb
zendesk_api-0.3.3 spec/core/middleware/response/callback_spec.rb
zendesk_api-0.3.2 spec/core/middleware/response/callback_spec.rb
zendesk_api-0.3.1 spec/core/middleware/response/callback_spec.rb
zendesk_api-0.3.0 spec/core/middleware/response/callback_spec.rb
zendesk_api-0.2.6 spec/core/middleware/response/callback_spec.rb
zendesk_api-0.2.5 spec/core/middleware/response/callback_spec.rb
zendesk_api-0.2.4 spec/core/middleware/response/callback_spec.rb
zendesk_api-0.2.2 spec/core/middleware/response/callback_spec.rb
zendesk_api-0.2.1 spec/core/middleware/response/callback_spec.rb