spec/unit/auth_spec.rb in ably-0.8.2 vs spec/unit/auth_spec.rb in ably-0.8.3

- old
+ new

@@ -1,15 +1,16 @@ require 'spec_helper' require 'shared/protocol_msgbus_behaviour' describe Ably::Auth do - let(:client) { double('client').as_null_object } - let(:client_id) { nil } - let(:options) { { key: 'appid.keyuid:keysecret', client_id: client_id } } + let(:client) { double('client').as_null_object } + let(:client_id) { nil } + let(:auth_options) { { key: 'appid.keyuid:keysecret', client_id: client_id } } + let(:token_params) { { } } subject do - Ably::Auth.new(client, options) + Ably::Auth.new(client, auth_options, token_params) end describe 'client_id option' do let(:client_id) { random_str.encode(encoding) } @@ -76,10 +77,10 @@ it 'should default capability to all' do expect(Ably::Auth::TOKEN_DEFAULTS.fetch(:capability)).to eql(all_capabilities) end - it 'should only have defaults for :ttl and :capability' do - expect(Ably::Auth::TOKEN_DEFAULTS.keys).to contain_exactly(:ttl, :capability) + it 'should have defaults for :ttl and :capability' do + expect(Ably::Auth::TOKEN_DEFAULTS.keys).to include(:ttl, :capability) end end end