Skip to content

Instantly share code, notes, and snippets.

@mPanasiewicz
Created September 12, 2016 17:04
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 mPanasiewicz/9751c1de65e9920d8ad6d6f866ef0ae5 to your computer and use it in GitHub Desktop.
Save mPanasiewicz/9751c1de65e9920d8ad6d6f866ef0ae5 to your computer and use it in GitHub Desktop.
require 'rails_helper'
RSpec.describe Spree::Admin::ProductsController, type: :controller do
describe 'GET synchronize' do
stub_authorization!
let!(:variant) { create(:variant) }
it 'updates @products pkb starpacks details' do
spree_get :synchronize, id: variant
expect(response).to have_http_status(200)
end
it 'returns record not found if product not exist' do
spree_get :synchronize, id: 0
expect(response).to have_http_status(404)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment