From dc7e6e560bd3774d5e80726c7795eecd7093cf15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C2=A0TheSmartnik?= Date: Mon, 11 Oct 2021 17:49:22 +0300 Subject: [PATCH] Update specs with comments to docs seciton for RSN3a/RSN3c --- spec/acceptance/rest/channels_spec.rb | 2 +- spec/unit/realtime/channels_spec.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/acceptance/rest/channels_spec.rb b/spec/acceptance/rest/channels_spec.rb index b34231a7e..8f82d5bb3 100644 --- a/spec/acceptance/rest/channels_spec.rb +++ b/spec/acceptance/rest/channels_spec.rb @@ -36,7 +36,7 @@ let(:new_channel_options) { { encrypted: true } } let(:original_channel) { client.channels.get(channel_name, options) } - it 'overrides the existing channel options and returns the channel object' do + it 'overrides the existing channel options and returns the channel object (RSN3c)' do expect(original_channel.options).to_not include(:encrypted) new_channel = client.channels.get(channel_name, new_channel_options) expect(new_channel).to be_a(Ably::Rest::Channel) diff --git a/spec/unit/realtime/channels_spec.rb b/spec/unit/realtime/channels_spec.rb index d1b947792..6382a9f51 100644 --- a/spec/unit/realtime/channels_spec.rb +++ b/spec/unit/realtime/channels_spec.rb @@ -11,19 +11,19 @@ context 'creating channels' do context '#get' do - it 'creates a channel if it does not exist' do + it 'creates a channel if it does not exist (RSN3a)' do expect(Ably::Realtime::Channel).to receive(:new).with(client, channel_name, options) subject.get(channel_name, options) end context 'when an existing channel exists' do - it 'will reuse a channel object if it exists' do + it 'will reuse a channel object if it exists (RSN3a)' do channel = subject.get(channel_name, options) expect(channel).to be_a(Ably::Realtime::Channel) expect(subject.get(channel_name, options).object_id).to eql(channel.object_id) end - it 'will update the options on the channel if provided' do + it 'will update the options on the channel if provided (RSN3c)' do channel = subject.get(channel_name, options) expect(channel.options).to eql(options) expect(channel.options).to_not include(:encrypted)