Sha256: 3cf061bc6e1a521f32c134415d8f0a0076a5b5bb4ef25edf85371fbd4a315034

Contents?: true

Size: 408 Bytes

Versions: 12

Compression:

Stored size: 408 Bytes

Contents

require '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

12 entries across 12 versions & 1 rubygems

Version Path
zendesk_api-0.1.11 spec/middleware/response/callback_spec.rb
zendesk_api-0.1.10 spec/middleware/response/callback_spec.rb
zendesk_api-0.1.9 spec/middleware/response/callback_spec.rb
zendesk_api-0.1.8 spec/middleware/response/callback_spec.rb
zendesk_api-0.1.7 spec/middleware/response/callback_spec.rb
zendesk_api-0.1.6 spec/middleware/response/callback_spec.rb
zendesk_api-0.1.5 spec/middleware/response/callback_spec.rb
zendesk_api-0.1.4 spec/middleware/response/callback_spec.rb
zendesk_api-0.1.3 spec/middleware/response/callback_spec.rb
zendesk_api-0.1.2 spec/middleware/response/callback_spec.rb
zendesk_api-0.1.1 spec/middleware/response/callback_spec.rb
zendesk_api-0.0.9 spec/middleware/response/callback_spec.rb