diff --git a/spec/jobs/trigger_job_spec.rb b/spec/jobs/trigger_job_spec.rb index 7ffbf76..c307ef3 100644 --- a/spec/jobs/trigger_job_spec.rb +++ b/spec/jobs/trigger_job_spec.rb @@ -10,7 +10,7 @@ before do AnycableSchema.execute( query: query, - context: { channel: channel, subscription_id: subscription_id }, + context: { channel: channel, subscription_id: "some-truly-random-number" }, variables: {}, operation_name: "SomeSubscription", ) @@ -44,10 +44,6 @@ double("Channel", id: "legacy_id", params: { "channelId" => "legacy_id" }, stream_from: nil, connection: connection) end - let(:subscription_id) do - "some-truly-random-number" - end - context "when config.delivery_method is active_job" do around do |ex| old_queue = ActiveJob::Base.queue_adapter @@ -63,7 +59,7 @@ end it "executes AnyCableSubscriptions" do - expect_any_instance_of(GraphQL::Jobs::TriggerJob).to receive(:perform).and_call_original + expect_any_instance_of(GraphQL::Jobs::TriggerJob).to receive(:perform) expect(GraphQL::Jobs::TriggerJob).to receive(:set).with(queue: "default").and_call_original trigger_changes @@ -80,7 +76,7 @@ end it "executes AnyCableSubscriptions" do - expect_any_instance_of(GraphQL::Jobs::TriggerJob).to receive(:perform).and_call_original + expect_any_instance_of(GraphQL::Jobs::TriggerJob).to receive(:perform) expect(GraphQL::Jobs::TriggerJob).to receive(:set).with(queue: "test").and_call_original trigger_changes