Sha256: 178109adeb4a85ccfb45cfbd6c4fe78f8cbcf084ad9836263f05f450ca392c61

Contents?: true

Size: 382 Bytes

Versions: 2

Compression:

Stored size: 382 Bytes

Contents

require 'spec_helper'

describe Appsignal::ZippedPayload do

  describe "#initialize" do
    it "should initialize a new `Appsignal::ZippedPayload` and zip the body" do
      payload = Appsignal::ZippedPayload.new({'the' => 'payload'})

      expect( payload.body ).to eql(Zlib::Deflate.deflate(
        "{\"the\":\"payload\"}",
        Zlib::BEST_SPEED
      ))
    end
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
appsignal-0.11.9 spec/lib/appsignal/zipped_payload_spec.rb
appsignal-0.11.8.beta.4 spec/lib/appsignal/zipped_payload_spec.rb