Sha256: ba9036fea0ffe00dc9052f8999b2a54537d2d44a112b96eda28119159fd55df2
Contents?: true
Size: 602 Bytes
Versions: 21
Compression:
Stored size: 602 Bytes
Contents
require 'spec_helper_integration' class Doorkeeper::OAuth::ClientCredentialsRequest describe Creator do let(:client) { FactoryGirl.create :application } let(:scopes) { Doorkeeper::OAuth::Scopes.from_string('public') } it 'creates a new token' do expect do subject.call(client, scopes) end.to change { Doorkeeper::AccessToken.count }.by(1) end it 'returns false if creation fails' do expect(Doorkeeper::AccessToken).to receive(:create).and_return(false) created = subject.call(client, scopes) expect(created).to be_falsey end end end
Version data entries
21 entries across 21 versions & 1 rubygems