spec/unit/models/token_details_spec.rb in ably-0.8.4 vs spec/unit/models/token_details_spec.rb in ably-0.8.5
- old
+ new
@@ -68,9 +68,17 @@
it 'is false' do
expect(subject.expired?).to eql(false)
end
end
+
+ context 'when expires is not available (i.e. string tokens)' do
+ subject { Ably::Models::TokenDetails.new() }
+
+ it 'is always false' do
+ expect(subject.expired?).to eql(false)
+ end
+ end
end
end
context '==' do
let(:token_attributes) { { token: 'unique' } }