spec/redstream/producer_spec.rb in redstream-0.3.0 vs spec/redstream/producer_spec.rb in redstream-0.4.0

- old
+ new

@@ -5,11 +5,11 @@ it "adds a queue message for individual objects" do product = create(:product) stream_key_name = Redstream.stream_key_name("products") - expect { Redstream::Producer.new.queue(product, delay_message_id: nil) }.to change { redis.xlen(stream_key_name) }.by(1) + expect { Redstream::Producer.new.queue(product) }.to change { redis.xlen(stream_key_name) }.by(1) expect(redis.xrange(stream_key_name, "-", "+").last[1]).to eq("payload" => JSON.dump(product.redstream_payload)) end it "deletes the delay message when given" do product = create(:product) @@ -97,10 +97,10 @@ it "adds bulk queue messages for scopes" do products = create_list(:product, 2) stream_key_name = Redstream.stream_key_name("products") - expect { Redstream::Producer.new.bulk_queue(Product.all, delay_message_ids: nil) }.to change { redis.xlen(stream_key_name) }.by(2) + expect { Redstream::Producer.new.bulk_queue(Product.all) }.to change { redis.xlen(stream_key_name) }.by(2) messages = redis.xrange(stream_key_name, "-", "+").last(2).map { |message| message[1] } expect(messages).to eq([ { "payload" => JSON.dump(products[0].redstream_payload) },