Skip to content

Commit

Permalink
little changes to spec
Browse files Browse the repository at this point in the history
  • Loading branch information
prog-supdex committed Sep 28, 2023
1 parent 0fe9967 commit 19b18a4
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions spec/jobs/trigger_job_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 19b18a4

Please sign in to comment.