Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spec: Don't assert error messages #432

Merged
merged 1 commit into from
Jul 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading