Sha256: 34a09177786cee51978d2de275c31539c32529baeda77882cf200ab059050a59
Contents?: true
Size: 415 Bytes
Versions: 3
Compression:
Stored size: 415 Bytes
Contents
module ShoppingCart RSpec.describe OrderItemsController, type: :controller do routes { ShoppingCart::Engine.routes } login_user describe 'DELETE #destroy' do before do @item = create :order_item end it 'deletes requested item' do expect{ delete :destroy, params: { id: @item.id } }.to change(OrderItem, :count).by(-1) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems