mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-11-28 09:24:24 +01:00
16 lines
647 B
Ruby
16 lines
647 B
Ruby
# frozen_string_literal: true
|
|
|
|
require 'test_helper'
|
|
|
|
class UserTest < ActiveSupport::TestCase
|
|
test 'must create wallet and profiles after create user' do
|
|
u = User.create(username: 'user', email: 'userwallet@fabmanager.com', password: 'Testpassword1$', password_confirmation: 'Testpassword1$',
|
|
profile_attributes: { first_name: 'user', last_name: 'wallet', phone: '0123456789' },
|
|
statistic_profile_attributes: { gender: true, birthday: 18.years.ago })
|
|
assert u.wallet.present?
|
|
assert u.profile.present?
|
|
assert u.invoicing_profile.present?
|
|
assert u.statistic_profile.present?
|
|
end
|
|
end
|