Sha256: 62cb8b1780e869a6f4bd07a4913815c25e635e1ed873d1f472d077f05688cf7e
Contents?: true
Size: 756 Bytes
Versions: 60
Compression:
Stored size: 756 Bytes
Contents
require 'spec_helper.rb' describe Rack::OAuth2::Server::Token::ClientCredentials do let(:request) { Rack::MockRequest.new app } let(:app) do Rack::OAuth2::Server::Token.new do |request, response| response.access_token = Rack::OAuth2::AccessToken::Bearer.new(:access_token => 'access_token') end end let(:params) do { :grant_type => 'client_credentials', :client_id => 'client_id', :client_secret => 'client_secret' } end subject { request.post('/', :params => params) } its(:status) { should == 200 } its(:content_type) { should == 'application/json' } its(:body) { should include '"access_token":"access_token"' } its(:body) { should include '"token_type":"bearer"' } end
Version data entries
60 entries across 60 versions & 2 rubygems