Skip to content

Commit

Permalink
adapt old spec
Browse files Browse the repository at this point in the history
  • Loading branch information
kickster97 committed Jan 29, 2025
1 parent 229d9dd commit 0d9ad70
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/message_routing_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -438,10 +438,10 @@ describe LavinMQ::MQTT::Exchange do
end
end

it "publish messages to queues with it's own publish method" do
it "should not publish if there is no consumers on the Session" do
with_amqp_server do |s|
vhost = s.vhosts.create("x")
s1 = LavinMQ::MQTT::Session.new(vhost, "session 1")
s1 = LavinMQ::MQTT::Session.new(vhost, "session")
index = LavinMQ::MQTT::TopicTree(String).new
store = LavinMQ::MQTT::RetainStore.new("tmp/retain_store", LavinMQ::Clustering::NoopServer.new, index)
x = LavinMQ::MQTT::Exchange.new(vhost, "mqtt.default", store)
Expand All @@ -456,7 +456,7 @@ describe LavinMQ::MQTT::Exchange do
}
msg = MQTT::Protocol::Publish.new(**pub_args)
x.publish(msg)
s1.message_count.should eq 1
s1.message_count.should eq 0
end
end
end

0 comments on commit 0d9ad70

Please sign in to comment.