Sha256: dbc7ca350f66b7eaf162f6343c969d32324d5e4bb9a574dc50accc30eca05738

Contents?: true

Size: 524 Bytes

Versions: 3

Compression:

Stored size: 524 Bytes

Contents

module ShoppingCart
  RSpec.describe 'Edit orders' do
    before { login_as user, scope: :user }
    let(:user) { user = create :user_with_orders }

    it 'should update order' do
      visit shopping_cart.root_path
      within '.edit_order' do
        fill_in 'order[order_items_attributes][0][quantity]', with: 10
      end
      click_button I18n.t('cart.update_order')

      expect(page).to have_content I18n.t('flash.updated', obj: 'Order')
      expect(page).to have_selector("input[value='10']")
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
shopping-cart-0.1.2 spec/features/shopping_cart/edit_current_order_spec.rb
shopping-cart-0.1.1 spec/features/shopping_cart/edit_current_order_spec.rb
shopping-cart-0.1.0 spec/features/shopping_cart/edit_current_order_spec.rb