diff --git a/spec/acceptance/rest/channel_spec.rb b/spec/acceptance/rest/channel_spec.rb index ae2665cb..37a4e174 100644 --- a/spec/acceptance/rest/channel_spec.rb +++ b/spec/acceptance/rest/channel_spec.rb @@ -191,7 +191,7 @@ 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 @@ -280,7 +280,7 @@ 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