Sha256: e4737650be8c18742ff04e9926ef3e841dc78eb1690aed5ad9eb02ea1370b6e2

Contents?: true

Size: 811 Bytes

Versions: 17

Compression:

Stored size: 811 Bytes

Contents

require "integration_spec_helper"

RSpec.describe NulogyMessageBusProducer::Subscriptions::RiskySubscriptionBlocker do
  it "blocks subscriptions with arguments" do
    query = <<~GRAPHQL
      foo {
        fieldWithArguments(first: "value")
      }
    GRAPHQL

    result = attempt_subscription(query)

    expect(result).to include_json(
      errors: [{
        message: "Arguments may not be used:\nfieldWithArguments"
      }]
    )
  end

  def attempt_subscription(query)
    execute_graphql(<<~GRAPHQL, NulogyMessageBusProducer::Specs::TestSchema)
      subscription {
        testCreated (
          subscriptionId: "#{SecureRandom.uuid}",
          subscriptionGroupId: "#{SecureRandom.uuid}",
          topicName: "some_topic"
        ) {
          #{query}
        }
      }
    GRAPHQL
  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/subscriptions/risky_subscription_blocker_spec.rb
nulogy_message_bus_producer-5.0.7 spec/integration/lib/nulogy_message_bus_producer/subscriptions/risky_subscription_blocker_spec.rb
nulogy_message_bus_producer-5.0.6 spec/integration/lib/nulogy_message_bus_producer/subscriptions/risky_subscription_blocker_spec.rb
nulogy_message_bus_producer-5.0.5 spec/integration/lib/nulogy_message_bus_producer/subscriptions/risky_subscription_blocker_spec.rb
nulogy_message_bus_producer-5.0.4 spec/integration/lib/nulogy_message_bus_producer/subscriptions/risky_subscription_blocker_spec.rb
nulogy_message_bus_producer-5.0.3 spec/integration/lib/nulogy_message_bus_producer/subscriptions/risky_subscription_blocker_spec.rb
nulogy_message_bus_producer-5.0.2 spec/integration/lib/nulogy_message_bus_producer/subscriptions/risky_subscription_blocker_spec.rb
nulogy_message_bus_producer-5.0.1 spec/integration/lib/nulogy_message_bus_producer/subscriptions/risky_subscription_blocker_spec.rb
nulogy_message_bus_producer-5.0.1.alpha spec/integration/lib/nulogy_message_bus_producer/subscriptions/risky_subscription_blocker_spec.rb
nulogy_message_bus_producer-5.0.0 spec/integration/lib/nulogy_message_bus_producer/subscriptions/risky_subscription_blocker_spec.rb
nulogy_message_bus_producer-4.0.0 spec/integration/lib/nulogy_message_bus_producer/subscriptions/risky_subscription_blocker_spec.rb
nulogy_message_bus_producer-3.7.0 spec/integration/lib/nulogy_message_bus_producer/subscriptions/risky_subscription_blocker_spec.rb
nulogy_message_bus_producer-3.6.0 spec/integration/lib/nulogy_message_bus_producer/subscriptions/risky_subscription_blocker_spec.rb
nulogy_message_bus_producer-3.5.0 spec/integration/lib/nulogy_message_bus_producer/subscriptions/risky_subscription_blocker_spec.rb
nulogy_message_bus_producer-4.0.0.alpha spec/integration/lib/nulogy_message_bus_producer/subscriptions/risky_subscription_blocker_spec.rb
nulogy_message_bus_producer-3.4.1 spec/integration/lib/nulogy_message_bus_producer/subscriptions/risky_subscription_blocker_spec.rb
nulogy_message_bus_producer-3.4.0 spec/integration/lib/nulogy_message_bus_producer/subscriptions/risky_subscription_blocker_spec.rb