Skip to content

Commit 1cda434

Browse files
committed
Update expected return
The expected result has changed in this test, as per this internal Slack thread[1]. [1] https://ably-real-time.slack.com/archives/CURL4U2FP/p1733479167314059?thread_ts=1733420816.469159&cid=CURL4U2FP
1 parent 397139c commit 1cda434

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

spec/acceptance/realtime/client_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
client.connection.once(:failed) do
3535
expect(custom_logger_object.logs.find do |severity, message|
3636
next unless %w(fatal error).include?(severity.to_s)
37-
message.match(%r{https://help.ably.io/error/40400})
37+
message.match(%r{https://help.ably.io/error/40101})
3838
end).to_not be_nil
3939
stop_reactor
4040
end

spec/acceptance/realtime/connection_failures_spec.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
error = connection_state_change.reason
3232
expect(connection.state).to eq(:failed)
3333
# TODO: Check error type is an InvalidToken exception
34-
expect(error.status).to eq(404)
35-
expect(error.code).to eq(40400) # not found
34+
expect(error.status).to eq(401)
35+
expect(error.code).to eq(40101) # not found
3636
stop_reactor
3737
end
3838
end
@@ -46,7 +46,7 @@
4646
error = connection_state_change.reason
4747
expect(connection.state).to eq(:failed)
4848
# TODO: Check error type is a TokenNotFound exception
49-
expect(error.status).to eq(401)
49+
expect(error.status).to eq(404)
5050
expect(error.code).to eq(40400) # not found
5151
stop_reactor
5252
end
@@ -1396,10 +1396,10 @@ def kill_connection_transport_and_prevent_valid_resume
13961396
channel = client.channels.get("foo")
13971397
channel.attach do
13981398
connection.once(:failed) do |state_change|
1399-
expect(state_change.reason.code).to eql(40400)
1400-
expect(connection.error_reason.code).to eql(40400)
1399+
expect(state_change.reason.code).to eql(40101)
1400+
expect(connection.error_reason.code).to eql(40101)
14011401
expect(channel).to be_failed
1402-
expect(channel.error_reason.code).to eql(40400)
1402+
expect(channel.error_reason.code).to eql(40101)
14031403
stop_reactor
14041404
end
14051405

spec/acceptance/rest/client_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ def encode64(text)
3333
it 'logs an entry with a help href url matching the code #TI5' do
3434
begin
3535
client.channels.get('foo').publish('test')
36-
raise 'Expected Ably::Exceptions::ResourceMissing'
37-
rescue Ably::Exceptions::ResourceMissing => err
38-
expect err.to_s.match(%r{https://help.ably.io/error/40400})
36+
raise 'Expected Ably::Exceptions::UnauthorizedRequest'
37+
rescue Ably::Exceptions::UnauthorizedRequest => err
38+
expect err.to_s.match(%r{https://help.ably.io/error/40101})
3939
end
4040
end
4141
end

0 commit comments

Comments
 (0)