Sha256: 32caa850e1e790374cd6dcd02815843282f64a0679b4da11447e428d88fab10b
Contents?: true
Size: 744 Bytes
Versions: 7
Compression:
Stored size: 744 Bytes
Contents
require 'spec_helper' module Doorkeeper::OAuth describe ClientCredentialsRequest do let(:server) { Doorkeeper.configuration } context 'with a valid request' do let(:client) { FactoryBot.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
7 entries across 7 versions & 3 rubygems