Sha256: d3931df3eeb887793795bb726d1707dd0d727227e30b7636eed96421a44b430e

Contents?: true

Size: 475 Bytes

Versions: 2

Compression:

Stored size: 475 Bytes

Contents

require "spec_helper"

module Asyncapi::Server
  describe JobSerializer do

    let(:job) { build_stubbed(:asyncapi_server_job) }
    let(:serializer) { described_class.new(job) }
    subject(:serialized_hash) { serializer.attributes }

    its([:id]) { is_expected.to eq job.id }
    its([:status]) { is_expected.to eq job.status }

    it "has a url" do
      allow(job).to receive(:url).and_return("url")
      expect(serialized_hash[:url]).to eq "url"
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
asyncapi-server-1.3.2 spec/serializers/job_serializer_spec.rb
asyncapi-server-1.3.0 spec/serializers/job_serializer_spec.rb