Sha256: 241917b0b63258425b90808706382a649f4a37c14e975202d07a6510cbbee507
Contents?: true
Size: 716 Bytes
Versions: 17
Compression:
Stored size: 716 Bytes
Contents
require 'spec_helper' describe Rack::OAuth2::AccessToken::MAC::Verifier do let(:verifier) { Rack::OAuth2::AccessToken::MAC::Verifier.new(:algorithm => algorithm) } subject { verifier } context 'when "hmac-sha-1" is specified' do let(:algorithm) { 'hmac-sha-1' } its(:hash_generator) { should be_instance_of OpenSSL::Digest::SHA1 } end context 'when "hmac-sha-256" is specified' do let(:algorithm) { 'hmac-sha-256' } its(:hash_generator) { should be_instance_of OpenSSL::Digest::SHA256 } end context 'otherwise' do let(:algorithm) { 'invalid' } it do expect { verifier.send(:hash_generator) }.to raise_error(StandardError, 'Unsupported Algorithm') end end end
Version data entries
17 entries across 17 versions & 2 rubygems