2019-06-04 13:33:00 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-07-18 18:16:54 +02:00
|
|
|
require 'test_helper'
|
|
|
|
|
|
|
|
class UserTest < ActiveSupport::TestCase
|
2019-06-04 13:33:00 +02:00
|
|
|
test 'must create wallet and profiles after create user' do
|
2022-07-29 17:37:42 +02:00
|
|
|
u = User.create(username: 'user', email: 'userwallet@fabmanager.com', password: 'Testpassword1$', password_confirmation: 'Testpassword1$',
|
2019-06-04 13:33:00 +02:00
|
|
|
profile_attributes: { first_name: 'user', last_name: 'wallet', phone: '0123456789' },
|
|
|
|
statistic_profile_attributes: { gender: true, birthday: 18.years.ago })
|
2016-07-18 18:16:54 +02:00
|
|
|
assert u.wallet.present?
|
2019-06-04 13:33:00 +02:00
|
|
|
assert u.profile.present?
|
|
|
|
assert u.invoicing_profile.present?
|
|
|
|
assert u.statistic_profile.present?
|
2016-07-18 18:16:54 +02:00
|
|
|
end
|
|
|
|
end
|