spec/unit/models/protocol_message_spec.rb in ably-1.2.2 vs spec/unit/models/protocol_message_spec.rb in ably-1.2.3
- old
+ new
@@ -398,35 +398,9 @@
expect(protocol_message.message_size).to eq(76)
end
end
end
- context '#has_correct_message_size? (#TO3l8)' do
- context 'on presence' do
- it 'should return true when a message has correct size' do
- protocol_message = new_protocol_message(presence: [{ action: 1, data: 'x' * 100 }])
- expect(protocol_message.has_correct_message_size?).to eq(true)
- end
-
- it 'should return false when a message has not correct size' do
- protocol_message = new_protocol_message(presence: [{ action: 1, data: 'x' * 65537 }])
- expect(protocol_message.has_correct_message_size?).to eq(false)
- end
- end
-
- context 'on message' do
- it 'should return true when a message has correct size' do
- protocol_message = new_protocol_message(messages: [{ name: 'x' * 100 }])
- expect(protocol_message.has_correct_message_size?).to eq(true)
- end
-
- it 'should return false when a message has not correct size' do
- protocol_message = new_protocol_message(messages: [{ name: 'x' * 65537 }])
- expect(protocol_message.has_correct_message_size?).to eq(false)
- end
- end
- end
-
context '#connection_details (#TR4o)' do
let(:connection_details) { protocol_message.connection_details }
context 'with a JSON value' do
let(:protocol_message) { new_protocol_message(connectionDetails: { clientId: '1', connectionKey: 'key' }) }