Sha256: e12b94d5ba22685316058b51fb0f7407b14bc30ab19194e0f86c8ffe8b3e88bc

Contents?: true

Size: 423 Bytes

Versions: 6

Compression:

Stored size: 423 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 }

    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

6 entries across 6 versions & 1 rubygems

Version Path
asyncapi-server-1.2.0 spec/serializers/job_serializer_spec.rb
asyncapi-server-1.1.3 spec/serializers/job_serializer_spec.rb
asyncapi-server-1.1.2 spec/serializers/job_serializer_spec.rb
asyncapi-server-1.1.1 spec/serializers/job_serializer_spec.rb
asyncapi-server-1.1.0 spec/serializers/job_serializer_spec.rb
asyncapi-server-1.0.0 spec/serializers/job_serializer_spec.rb