Sha256: fd2e541b29cec07ee04fac042332e0a23f11af3c5ce5685005ac393e0af7802d
Contents?: true
Size: 977 Bytes
Versions: 28
Compression:
Stored size: 977 Bytes
Contents
require 'spec_helper' describe Auth0::Api::V2::Blacklists do before :all do dummy_instance = DummyClass.new dummy_instance.extend(Auth0::Api::V2::Blacklists) @instance = dummy_instance end context '.blacklisted_tokens' do it { expect(@instance).to respond_to(:blacklisted_tokens) } it 'is expected to call /api/v2/blacklists/tokens' do expect(@instance).to receive(:get).with('/api/v2/blacklists/tokens', aud: nil) expect { @instance.blacklisted_tokens }.not_to raise_error end end context '.add_token.to_blacklist' do it { expect(@instance).to respond_to(:add_token_to_blacklist) } it 'is expected to call post to /api/v2/blacklists/tokens' do expect(@instance).to receive(:post).with('/api/v2/blacklists/tokens', aud: 'aud', jti: 'jti') @instance.add_token_to_blacklist('jti', 'aud') end it { expect { @instance.add_token_to_blacklist('', '') }.to raise_error 'Must specify a valid JTI' } end end
Version data entries
28 entries across 28 versions & 1 rubygems