Skip to content

Commit

Permalink
Merge pull request #422 from ably/tests/fix-error-checks
Browse files Browse the repository at this point in the history
rest/channel_spec: fix test checking error messages
  • Loading branch information
sacOO7 authored Jul 4, 2024
2 parents 7f156b7 + 69ceaee commit cb684b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/acceptance/rest/channel_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down

0 comments on commit cb684b4

Please sign in to comment.