lib/submodules/ably-ruby/spec/acceptance/realtime/channel_spec.rb in ably-rest-1.1.6 vs lib/submodules/ably-ruby/spec/acceptance/realtime/channel_spec.rb in ably-rest-1.1.7
- old
+ new
@@ -1401,9 +1401,23 @@
end
end
end
end
end
+
+ context 'message size exceeded (#TO3l8)' do
+ let(:message) { 'x' * 700000 }
+
+ let(:client) { auto_close Ably::Realtime::Client.new(client_options) }
+ let(:channel) { client.channels.get(channel_name) }
+
+ it 'should not allow to send a message' do
+ channel.publish('event', message).errback do |error|
+ expect(error).to be_instance_of(Ably::Exceptions::MaxMessageSizeExceeded)
+ stop_reactor
+ end
+ end
+ end
end
describe '#subscribe' do
context 'with an event argument' do
it 'subscribes for a single event' do