Sha256: 31b13bad9ce629e8ffdd09c8f666d0d1d45e3ea5a970b39e4502d2497202e7bc
Contents?: true
Size: 610 Bytes
Versions: 11
Compression:
Stored size: 610 Bytes
Contents
require 'spec_helper' describe SimpleTokenAuthentication::TokenComparator do it_behaves_like 'a token comparator' it 'delegates token comparison to Devise.secure_compare', private: true do devise = double() allow(devise).to receive(:secure_compare).and_return('Devise.secure_compare response.') stub_const('Devise', devise) # delegating consists in sending the message expect(Devise).to receive(:secure_compare) response = subject.compare('A_raNd0MtoKeN', 'ano4heR-Tok3n') # and returning the response expect(response).to eq 'Devise.secure_compare response.' end end
Version data entries
11 entries across 11 versions & 2 rubygems