Sha256: 60e69cb50f3243682c3fcd3cdfb2fd03f5437f2e30c10fd04ee6cb78f6ffaa8b
Contents?: true
Size: 669 Bytes
Versions: 11
Compression:
Stored size: 669 Bytes
Contents
require 'spec_helper' require 'active_support/all' require 'doorkeeper/errors' require 'doorkeeper/server' describe Doorkeeper::Server do let(:fake_class) { mock :fake_class } subject do described_class.new end describe '.authorization_request' do it 'raises error when strategy does not exist' do expect { subject.authorization_request(:duh) }.to raise_error(Doorkeeper::Errors::InvalidAuthorizationStrategy) end it 'builds the request with selected strategy' do stub_const 'Doorkeeper::Request::Code', fake_class fake_class.should_receive(:build).with(subject) subject.authorization_request :code end end end
Version data entries
11 entries across 11 versions & 1 rubygems