Skip to content

Instantly share code, notes, and snippets.

View jeffreygray's full-sized avatar

jeffreygray

  • 02:24 (UTC -04:00)
View GitHub Profile
@jeffreygray
jeffreygray / test_spec.rb
Created May 8, 2023 16:00
bypass doorkeeper for rspec testing of controller
# Note: this test shows a context of after we authenticate
require "rails_helper"
RSpec.describe API::V1::Foobar, type: :controller do
let(:api_user) { create :api_user }
before do
allow(controller).to receive(:doorkeeper_token)
.and_return(instance_double("AccessToken", acceptable?: true, resource_owner_id: api_user.id))
@jeffreygray
jeffreygray / keybase.md
Created February 17, 2023 17:08
keybase.md

Keybase proof

I hereby claim:

  • I am jeffreygray on github.
  • I am frij0lit0 (https://keybase.io/frij0lit0) on keybase.
  • I have a public key ASBsqlZf_7cDqAsGflXe2hYbtt0IgbJ5h3qZnYMD3BmxqAo

To claim this, I am signing this object: