Sha256: 84374fb09c335f7f8976bbfee2ad19d326ffebf9cf998d4a37d51545c1ab1d73
Contents?: true
Size: 756 Bytes
Versions: 61
Compression:
Stored size: 756 Bytes
Contents
require 'spec_helper_integration' module Doorkeeper::OAuth describe ClientCredentialsRequest do let(:server) { Doorkeeper.configuration } context 'with a valid request' do let(:client) { FactoryGirl.create :application } it 'issues an access token' do request = ClientCredentialsRequest.new(server, client, {}) expect do request.authorize end.to change { Doorkeeper::AccessToken.count }.by(1) end end describe 'with an invalid request' do it 'does not issue an access token' do request = ClientCredentialsRequest.new(server, nil, {}) expect do request.authorize end.to_not change { Doorkeeper::AccessToken.count } end end end end
Version data entries
61 entries across 61 versions & 2 rubygems
Version | Path |
---|---|
doorkeeper-0.4.0 | spec/lib/oauth/client_credentials_integration_spec.rb |