Sha256: 28e82427cb2607f1700147d36bf1b365bd5f37e9907e602e10683a7f78cd4e5e

Contents?: true

Size: 968 Bytes

Versions: 17

Compression:

Stored size: 968 Bytes

Contents

require "integration_spec_helper"

module NulogyMessageBusProducer
  RSpec.describe Config do
    let(:config) { described_class.new }

    describe "add_subscription" do
      it "adds a subscription" do
        id = SecureRandom.uuid
        group_id = SecureRandom.uuid
        query = <<~QUERY
          subscription {
            testCreated(subscriptionId: "#{id}", subscriptionGroupId: "#{group_id}", topicName: "test-topic") {
              foo {
                id
              }
            }
          }
        QUERY

        config.add_subscription!(
          schema: "NulogyMessageBusProducer::Specs::TestSchema",
          query: query
        )

        expect(config.configured_subscriptions).to include(having_attributes(
          id: id,
          subscription_group_id: group_id,
          schema_key: "test",
          event_type: "testCreated",
          topic_name: "test-topic",
          query: query
        ))
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
nulogy_message_bus_producer-5.0.8 spec/integration/lib/nulogy_message_bus_producer/config_spec.rb
nulogy_message_bus_producer-5.0.7 spec/integration/lib/nulogy_message_bus_producer/config_spec.rb
nulogy_message_bus_producer-5.0.6 spec/integration/lib/nulogy_message_bus_producer/config_spec.rb
nulogy_message_bus_producer-5.0.5 spec/integration/lib/nulogy_message_bus_producer/config_spec.rb
nulogy_message_bus_producer-5.0.4 spec/integration/lib/nulogy_message_bus_producer/config_spec.rb
nulogy_message_bus_producer-5.0.3 spec/integration/lib/nulogy_message_bus_producer/config_spec.rb
nulogy_message_bus_producer-5.0.2 spec/integration/lib/nulogy_message_bus_producer/config_spec.rb
nulogy_message_bus_producer-5.0.1 spec/integration/lib/nulogy_message_bus_producer/config_spec.rb
nulogy_message_bus_producer-5.0.1.alpha spec/integration/lib/nulogy_message_bus_producer/config_spec.rb
nulogy_message_bus_producer-5.0.0 spec/integration/lib/nulogy_message_bus_producer/config_spec.rb
nulogy_message_bus_producer-4.0.0 spec/integration/lib/nulogy_message_bus_producer/config_spec.rb
nulogy_message_bus_producer-3.7.0 spec/integration/lib/nulogy_message_bus_producer/config_spec.rb
nulogy_message_bus_producer-3.6.0 spec/integration/lib/nulogy_message_bus_producer/config_spec.rb
nulogy_message_bus_producer-3.5.0 spec/integration/lib/nulogy_message_bus_producer/config_spec.rb
nulogy_message_bus_producer-4.0.0.alpha spec/integration/lib/nulogy_message_bus_producer/config_spec.rb
nulogy_message_bus_producer-3.4.1 spec/integration/lib/nulogy_message_bus_producer/config_spec.rb
nulogy_message_bus_producer-3.4.0 spec/integration/lib/nulogy_message_bus_producer/config_spec.rb