Doorkeeper- Unit test cases

17 views
Skip to first unread message

ganesh kumar

unread,
Feb 8, 2015, 10:26:26 AM2/8/15
to bangal...@googlegroups.com
Hi All,


I am trying to write unit test cases for doorkeeper authenticate mechanism,
Doorkeeper.configure do
  resource_owner_from_credentials do |routes|
    request.params[:user] = {:email => request.params[:username], :password => request.params[:password]}
    request.env["devise.allow_params_authentication"] = true
    request.env["warden"].authenticate!(:scope => :user)
  end
end
Due to webmock gem I am unable to use Oauth2 gem.


Can you suggest how to test it?

Regards
Ganesh



--
The only safety in life is to enjoy the risk of living.
Reply all
Reply to author
Forward
0 new messages