Created
April 3, 2017 17:09
-
-
Save braidn/93c0d1fbc83835fd4d116e5abece169f to your computer and use it in GitHub Desktop.
A Sane API Setup For API Requests in Solidus
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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