lib/submodules/ably-ruby/spec/acceptance/rest/channel_spec.rb in ably-rest-1.2.4 vs lib/submodules/ably-ruby/spec/acceptance/rest/channel_spec.rb in ably-rest-1.2.6

- old
+ new

@@ -189,11 +189,11 @@ context 'without adequate permissions on the channel' do let(:capability) { { onlyChannel: ['subscribe'] } } let(:client_options) { default_options.merge(use_token_auth: true, default_token_params: { capability: capability }) } it 'raises a permission error when publishing' do - expect { channel.publish(name, data) }.to raise_error(Ably::Exceptions::UnauthorizedRequest, /not permitted/) + expect { channel.publish(name, data) }.to raise_error(Ably::Exceptions::UnauthorizedRequest, /40160/) end end context 'null attributes' do context 'when name is null' do @@ -278,10 +278,10 @@ end end context 'with an invalid client_id in the message' do it 'succeeds in the client library but then fails when published to Ably' do - expect { channel.publish([name: 'event', client_id: 'invalid']) }.to raise_error Ably::Exceptions::InvalidRequest, /mismatched clientId/ + expect { channel.publish([name: 'event', client_id: 'invalid']) }.to raise_error(Ably::Exceptions::InvalidRequest, /40012/) end end context 'with an empty client_id in the message' do it 'succeeds and publishes with an implicit client_id' do