Skip to content

Commit

Permalink
Replace order_coupon_code -> coupon_code
Browse files Browse the repository at this point in the history
solidusio/solidus#2958 replaced `order_coupon_code` text field for
`coupon_code`, which broke master build. This patch fixes this
regression.
  • Loading branch information
aitbw committed Jan 29, 2019
1 parent f48f82d commit 113928d
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions spec/features/checkout_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,14 @@
it 'TaxCloud Test Case 3, with item discount' do
add_to_cart('Shirt')

fill_in 'order_coupon_code', with: 'AAAA'
click_button 'Update'
if Spree.solidus_gem_version >= Gem::Version.new('2.8.0')
fill_in 'coupon_code', with: 'AAAA'
click_button 'Apply Code'
else
fill_in 'order_coupon_code', with: 'AAAA'
click_button 'Update'
end

expect(page).not_to have_content('The coupon code you entered doesn\'t exist.')
expect(page).to have_content('The coupon code was successfully applied to your order.')
click_button 'Checkout'
Expand All @@ -311,8 +317,14 @@
add_to_cart('Shirt')
add_to_cart('Shirt')

fill_in 'order_coupon_code', with: 'AAAA'
click_button 'Update'
if Spree.solidus_gem_version >= Gem::Version.new('2.8.0')
fill_in 'coupon_code', with: 'AAAA'
click_button 'Apply Code'
else
fill_in 'order_coupon_code', with: 'AAAA'
click_button 'Update'
end

expect(page).not_to have_content('The coupon code you entered doesn\'t exist.')
expect(page).to have_content('The coupon code was successfully applied to your order.')
click_button 'Checkout'
Expand Down

0 comments on commit 113928d

Please sign in to comment.