Commit Graph

143 Commits

Author SHA1 Message Date
luisramos0
86b0d71c7e Result of rubocop auto-correct and rebuilding rubocop_manual_todo 2019-05-28 12:57:29 +01:00
luisramos0
d602375ac7 Redirect user to cart page if some item in the order is unavailable 2019-04-13 20:31:05 +01:00
luisramos0
a36722cebf Merge branch '2-0-stable' into 2-0-remove-variant-count-on-hand 2019-02-26 12:47:11 +00:00
Pau Pérez Fabregat
aed9c41b0d Merge pull request #3394 from mkllnk/3021-update-soft-delete
[Spree upgrade] 3021 update soft delete
2019-02-25 11:58:41 +01:00
luisramos0
5d51ad71b0 Merge branch 'master' into 2-0-stable-Feb20 2019-02-20 14:32:36 +00:00
Maikel Linke
5d828bd7ae Update soft-delete of products
Spree changed their way of soft-deleting products, variants and
some other models. `#destroy` is now soft-deleting and replaces
`#delete`.

This commit considers only products. Variants will follow in another
commit. The other models can be ignored, because we don't call `delete`
on them.
2019-02-19 14:25:18 +11:00
luisramos0
f0842fcbe5 Convert all calls to variant.count_on_hand to variant.on_hand 2019-02-18 21:54:07 +00:00
Maikel Linke
5f5b0aaabf Simplify specs with stripe factory 2019-02-13 18:34:22 +11:00
luisramos0
8a034a1538 Fix occurrences of order.shipping_method= by replacing with order.shipments= 2018-10-30 13:37:45 +00:00
luisramos0
843cd44b23 In paypal_spec, fixed setting shipping_method in order, this is now done through order shipments 2018-09-17 00:51:01 +01:00
Grey Baker
468c29b8c1 Use new basic auth stub style 2018-08-22 21:35:56 +01:00
Matt-Yorkley
ff0e0d9f3d Move logic from ApplicationController to service and improve clarity 2018-06-20 01:28:35 +01:00
Matt-Yorkley
e73b378201 Adjust embedded response headers 2018-06-20 01:28:35 +01:00
Matt-Yorkley
c2934d3570 Ensure domain in SSL header matches request with or without www prefix 2018-05-21 17:50:34 +01:00
Matt-Yorkley
4a818c07bb Only include one host in embedded shopfornt headers 2018-02-23 15:57:28 +00:00
Rob Harrington
03f1980b1b Auto-correct rubocop offences for standing-orders 2018-02-09 14:44:07 +11:00
Julius Pabrinkis
dae74666c5 Add missing 'type: :request' for request spec 2017-11-10 08:47:12 +11:00
Rob Harrington
c031b0e52b Clear shipments and payments after failed payment at checkout 2017-10-13 12:53:35 +11:00
Rob Harrington
6006952603 Moving checkout request specs into their own folder 2017-10-13 12:53:35 +11:00
Rob Harrington
ba61f94906 Expose Stripe token creation error messages in Checkout 2017-09-23 14:58:35 +10:00
Rob Harrington
7c82fa3d44 Show more helpful payment processing error in checkout 2017-09-23 14:58:35 +10:00
Rob Harrington
d2096cf6d1 Make request stubs less brittle by using regex 2017-09-23 14:58:34 +10:00
Rob Harrington
61feb2b27d Rename Stripe existing_card param key to existing_card_id 2017-09-23 14:58:34 +10:00
Rob Harrington
2ed5e144ca Convert problematic embedded shopfronts feature spec into request spec 2017-09-23 14:58:34 +10:00
Rob Harrington
3b78179dea Ask customer about saving card details used in checkout 2017-09-23 14:58:33 +10:00
Rob Harrington
8901af897a Store card details submitted via checkout 2017-09-23 14:58:33 +10:00
Rob Harrington
ee92f46bd5 Fix stripe request spec by providing en enterprise_id
The enterprise_id is used to lookup a StripeAccount which is provided to the Spree::Token#create call in the StripeConnect gateway
2017-09-23 14:58:33 +10:00
Rob Harrington
44ba499ad9 Stub rather than set Stripe api_key in specs 2017-09-23 14:58:33 +10:00
Rob Harrington
5c58d30ca7 Create payment from user-specified payment method when using existing card 2017-09-23 14:58:33 +10:00
Rob Harrington
42dd58426e Auto-correct rubocop offences for stripe-connect 2017-09-23 14:58:32 +10:00
Rob Harrington
01ce092ebc Handle Stripe token creation request failure 2017-09-23 14:58:32 +10:00
Rob Harrington
5d77ef52c5 Replace text strings with variables in stripe request spec 2017-09-23 14:58:32 +10:00
Rob Harrington
64009a2c9e CheckoutController can render payment gateway error messages as json 2017-09-23 14:58:32 +10:00
Rob Harrington
269a60b36f Adding request specs for case when using an existing card stored by Stripe for payment 2017-09-23 14:58:32 +10:00
Rob Harrington
25907f97a8 Cleaning up Stripe Connect request spec 2017-09-23 14:58:32 +10:00
stveep
56295e5ffb Fix request and feature specs 2017-09-23 14:58:31 +10:00
Rob Harrington
7c831c9844 Adding StripeJS to checkout page
Allow tokens to be request and passed through as payment source_attributes
2017-09-23 14:57:02 +10:00
Rob Harrington
f4b1c5de9c Remove orphaned PayPalExpress payments when processing actual PayPalExpress payment
Fixes both #1074 and #1837
2017-09-21 12:11:39 +10:00
Maikel Linke
cd7721a127 Using date and time of current timezone
Using Time.zone.now and Date.current instead of Time.now and Date.today.
This should make all specs timezone independent.
2015-12-10 11:38:41 +11:00
Rob Harrington
ab7bfd10c5 Revert "Renaming options_text to unit_text so that we can use method from included VariantAndLineItemNaming module"
This reverts commit e86e08b72e939fee61eddd41d56081395666a877.

Conflicts:
	lib/open_food_network/order_and_distributor_report.rb
	spec/features/admin/variants_spec.rb
	spec/lib/open_food_network/order_and_distributor_report_spec.rb
2015-10-28 13:08:50 +11:00
Rob Harrington
795830d94d Renaming options_text to unit_text so that we can use method from included VariantAndLineItemNaming module 2015-10-28 13:07:31 +11:00
Maikel Linke
6c0238deac scoping down large request spec 2015-06-10 13:50:55 +10:00
Maikel Linke
f88f42283a Session stored in ActiveRecored instead of Cookies
The cookie store is not big enough in some cases. In order to solve a
CookieOverflow error and maybe track down the underlying issue this
patch uses the database instead of cookies to store session data.
2015-06-10 13:49:24 +10:00
Rob Harrington
b9f19d5777 Fixing broken specs 2015-04-17 13:00:20 +10:00
Rohan Mitchell
8c2adb2a05 Fix specs: feature specs requiring payment and shipping methods, race condition, double flash message issue 2014-11-01 12:11:50 +11:00
Will Marshall
27728d6f0e Adding our first request spec 2014-05-05 12:10:14 +10:00
Rohan Mitchell
488fc2d60e Upgrade capybara, spec/requests changed to spec/features 2013-01-15 10:10:24 +11:00
Rohan Mitchell
e46d61075e Simplify field naming 2013-01-10 15:33:56 +11:00
Rohan Mitchell
4e78fa19a3 Add spec for updating order cycle, minor fixes 2013-01-10 15:29:13 +11:00
Rohan Mitchell
31ea8540ea Test editing an order cycle - all data is displayed 2013-01-10 15:02:56 +11:00