Skip to content

Commit

Permalink
Merge pull request #432 from ably/spec-no-error-message
Browse files Browse the repository at this point in the history
spec: Don't assert error messages
  • Loading branch information
lmars authored Jul 24, 2024
2 parents 79cf2f5 + 72120de commit 7cd1083
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions spec/acceptance/realtime/auth_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,6 @@ def disconnect_transport(connection)
deferrable.errback do |error|
EventMachine.add_timer(0.2) do
expect(connection_failed).to eql(true)
expect(error.message).to match(/invalid.*accessToken/i)
expect(error.code).to eql(40005)
stop_reactor
end
Expand All @@ -627,7 +626,6 @@ def disconnect_transport(connection)
end

client.connection.once(:failed) do
expect(client.connection.error_reason.message).to match(/invalid.*accessToken/i)
expect(client.connection.error_reason.code).to eql(40005)
connection_failed = true
end
Expand Down Expand Up @@ -664,7 +662,6 @@ def disconnect_transport(connection)
channel.attach do
channel.publish('not-allowed').errback do |error|
expect(error.code).to eql(40160)
expect(error.message).to match(/permission denied/)

client.auth.authorize(nil, auth_callback: upgraded_token_cb)
client.connection.once(:update) do
Expand Down Expand Up @@ -1058,7 +1055,6 @@ def disconnect_transport(connection)

it 'disconnected includes and invalid signature message' do
client.connection.once(:disconnected) do |state_change|
expect(state_change.reason.message.match(/signature verification failed/i)).to_not be_nil
expect(state_change.reason.code).to eql(40144)
stop_reactor
end
Expand Down Expand Up @@ -1111,7 +1107,6 @@ def disconnect_transport(connection)

it 'authentication fails and reason for disconnection is invalid signature' do
client.connection.once(:disconnected) do |state_change|
expect(state_change.reason.message.match(/signature verification failed/i)).to_not be_nil
expect(state_change.reason.code).to eql(40144)
stop_reactor
end
Expand Down Expand Up @@ -1143,7 +1138,6 @@ def disconnect_transport(connection)

it 'fails with an invalid signature error' do
client.connection.once(:disconnected) do |state_change|
expect(state_change.reason.message.match(/signature verification failed/i)).to_not be_nil
expect(state_change.reason.code).to eql(40144)
stop_reactor
end
Expand Down Expand Up @@ -1248,7 +1242,6 @@ def disconnect_transport(connection)
allowed_channel = client.channels.get(channel_with_publish_permissions)
forbidden_channel.publish('not-allowed').errback do |error|
expect(error.code).to eql(40160)
expect(error.message).to match(/permission denied/)

allowed_channel.publish(message_name) do |message|
expect(message.name).to eql(message_name)
Expand Down

0 comments on commit 7cd1083

Please sign in to comment.