Commit Graph

39 Commits

Author SHA1 Message Date
luisramos0
791ff842aa Add some tests to models/spree/user_spec from spre_auth_devise 2019-07-11 19:39:31 +01:00
Maikel Linke
5c72c35060 Use better credit card factory for subs specs
The specs for subscriptions were creating simple one-time-use credit
cards. They should not be used for subscriptions. After this was fixed
in previous commits, these integration tests failed. Now we use a new
factory that mimics stored credit cards that can be used for
subscriptions.
2019-06-11 18:01:41 +01:00
luisramos0
04801e5c2e Run transpec in spec/models 2019-05-09 22:25:29 +01:00
Pau Perez
aa3f0ac577 Reuse #superadmin? in Delayed Job Web route
This moves #superadmin? to the user decorator so it can be reused
outside FeatureFlags.
2019-04-04 16:00:27 +02:00
Maikel Linke
e6adb8a3b9 Extract email setup in specs for easy upgrade
The way we set up email sending completely changes with Spree 2. This
change encapsulates that code in a single method so that it can be
changed easily and doesn't create further merge conflicts while we are
still working on the master branch and the Spree upgrade.
2018-10-25 13:53:22 +11:00
Matt-Yorkley
8f5fd41c8b Update email confirmation address 2018-10-08 21:38:47 +01:00
Maikel Linke
600c8fcd4c Send confirmation emails immediately
Using deferred methods on the user model breaks delayed jobs when the
user is deleted while the job still exists. We could create a proper job
referencing a user id for sending these emails instead. But since the
user has to wait for the confirmation email anyway, we can send it
within the current request. This should be revised if performance
becomes an issue.

Sending the email directly also has the advantage that we can tell the
user if emailing failed. See the following commits.

This change impacts a bunch of specs as we now need a working email
setup to create unconfirmed users. This commit introduces a custom
matcher to unify testing for confirmation emails.
2018-09-27 13:33:08 +10:00
Rob Harrington
fc2844a3d5 Add default_card method to user model 2018-07-05 19:26:11 +10:00
Matt-Yorkley
357ff5fb7d Improve associating customer specs 2018-04-04 10:14:55 +10:00
Em-AK
3b5c3f41a2 Ensure created users are associated with customers
When a user is created with the same email as existing customers
Then the user is associated with these customers

So that the user can access the private shops where he has been invited
to before signup
2018-04-04 10:14:55 +10:00
Pierre de Lacroix
4f0b20e8ad Better tests 2018-02-07 10:41:51 +11:00
Pierre de Lacroix
eb1c598a6c Fix tests 2018-02-07 10:41:51 +11:00
Rob Harrington
c747bb5305 Remove improper use of quick_login_as_admin from unit spec 2017-10-11 16:10:08 +11:00
Rob Harrington
b9d72ce4cf Refactoring logic for displaying orders on the front-end account page 2017-09-23 14:58:32 +10:00
Bing Xie
d48b00c77c Fix failed user spec 2016-10-21 10:51:36 +11:00
Bing Xie
f14ca87eb5 Set new address for user 2016-10-21 10:51:36 +11:00
Steve Pettitt
ad6037ac63 Fix user spec, check config is set 2016-04-26 04:21:50 +01:00
Steve Pettitt
53d50f16d6 Merge current master 2016-04-26 03:18:27 +01:00
Maikel Linke
2367b73d3a Revert "Associate new users with existing customer records"
This reverts commit a25f4fdf44.

Since email addresses are not validated, these associations would allow
an attacker to signup with the email address of another person and view
their orders.
2016-04-22 14:55:43 +10:00
Steve Pettitt
0b820361de Merge master 2016-04-15 08:29:52 +01:00
Steve Pettitt
fc719230a3 Add failed payments, update spec 2016-04-15 08:26:12 +01:00
Maikel Linke
a25f4fdf44 Associate new users with existing customer records 2016-04-15 11:57:18 +10:00
Steve Pettitt
276d3026c8 Adding specs for orders by ditributor query 2016-03-18 20:05:52 +00:00
Rob Harrington
13adb61b3a Refactoring invoice update process to use new AccountInvoice model 2015-09-17 22:38:29 +10:00
Rob Harrington
6cc403cd92 Preventing double creation of invoices by recognising completed invoices within the specifed period 2015-09-17 22:38:13 +10:00
Rob Harrington
ee8a86d495 User model can generate a current invoice for enterprise users 2015-09-17 22:37:56 +10:00
Rohan Mitchell
e9fbd74e88 Send emails via jobs instead of synchronously 2015-04-16 16:54:43 +10:00
Rohan Mitchell
7f6c02ca29 Add User#customer_of to look up customers 2015-04-16 10:59:15 +10:00
Maikel Linke
379b702b9b spec: testing array of owned groups without order 2015-02-26 16:22:15 +11:00
Maikel Linke
8e83c6679a extended test of owned groups 2015-02-19 11:25:31 +11:00
Maikel Linke
903bd21577 Merge remote-tracking branch 'origin/master' into group-pages-merge
Conflicts:
	README.markdown
	db/schema.rb
2015-02-13 15:42:36 +11:00
Rob Harrington
ad1f837c44 Admin users can access all users through known_users 2015-02-12 11:34:58 +11:00
Rob Harrington
b73619d168 Adding known_users method to Spree::User 2015-02-12 11:34:58 +11:00
Maikel Linke
91b35d068c Adding owner to groups
Groups have owners and users own groups. The owners are displayed and
changable on the group's page by admin users.
2015-02-02 15:58:34 +11:00
Rob Harrington
977c508833 Make enterprise limit error messages more specific 2014-10-30 13:02:16 +11:00
Rob H
f1c19ea64c Enterprise validates owner enterprise_limit 2014-09-11 14:54:51 +10:00
Rob H
7fbc9aa680 User validates the number of enterprises owned 2014-09-11 14:54:51 +10:00
Rob H
31de5d45ea Adding owner to enterprise 2014-09-11 14:36:09 +10:00
Will Marshall
5c999fd9cf Adding a signup confirmation email 2014-04-04 12:36:33 +13:00