Sha256: f9f004785ddb45ab53a56459aa166523bfa2d090f1354b68b8638108a06a67b9
Contents?: true
Size: 534 Bytes
Versions: 3
Compression:
Stored size: 534 Bytes
Contents
RSpec.describe 'Add To Cart button' do let(:user) { create :user } let(:product) { create :product, title: 'title' } before do login_as user, scope: :user visit main_app.product_path(product) within '#add_to_cart' do fill_in 'quantity', with: 3 end click_button 'Add to cart' end it 'should add product to cart with right amount' do expect(page).to have_content I18n.t('cart.page_title') expect(page).to have_content 'title' expect(page).to have_selector 'input[value="3"]' end end
Version data entries
3 entries across 3 versions & 1 rubygems