Skip to content

Commit

Permalink
Added test for invalid recovery key
Browse files Browse the repository at this point in the history
  • Loading branch information
sacOO7 committed May 16, 2024
1 parent 718a0c7 commit d654665
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions spec/unit/realtime/recovery_key_context_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,11 @@
expect(decoded_recovery_key.msg_serial).to eq(123)
end

it 'should return nil for invalid recovery key' do
encoded_recovery_key = "{\"invalid key\"}"
decoded_recovery_key = Ably::Realtime::RecoveryKeyContext.from_json(encoded_recovery_key)
expect(decoded_recovery_key).to be_nil
end

end
end

0 comments on commit d654665

Please sign in to comment.