Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@braidn
Created April 3, 2017 17:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save braidn/93c0d1fbc83835fd4d116e5abece169f to your computer and use it in GitHub Desktop.
Save braidn/93c0d1fbc83835fd4d116e5abece169f to your computer and use it in GitHub Desktop.
A Sane API Setup For API Requests in Solidus
RSpec.shared_context 'api_setup' do
let!(:user) { create :user }
before :each do
user.generate_spree_api_key!
end
let(:headers) do
{
'Accept' => 'application/json',
'X-Spree-Token' => user.spree_api_key
}
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment