Skip to content

Commit ff5f817

Browse files
committed
Update user factory to latest FactoryBot version
1 parent 03583d6 commit ff5f817

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,28 @@
1+
# frozen_string_literal: true
2+
13
FactoryBot.define do
2-
factory :alchemy_user, class: 'Alchemy::User' do
4+
factory :alchemy_user, class: Alchemy::User do
35
sequence(:login) { |n| "john_#{n}.doe" }
46
sequence(:email) { |n| "john_#{n}@doe.com" }
5-
firstname 'John'
6-
lastname 'Doe'
7-
password 's3cr3t'
8-
password_confirmation 's3cr3t'
7+
firstname { 'John' }
8+
lastname { 'Doe' }
9+
password { 's3cr3t' }
10+
password_confirmation { 's3cr3t' }
911

1012
factory :alchemy_admin_user do
11-
alchemy_roles 'admin'
13+
alchemy_roles { 'admin' }
1214
end
1315

1416
factory :alchemy_member_user do
15-
alchemy_roles 'member'
17+
alchemy_roles { 'member' }
1618
end
1719

1820
factory :alchemy_author_user do
19-
alchemy_roles 'author'
21+
alchemy_roles { 'author' }
2022
end
2123

2224
factory :alchemy_editor_user do
23-
alchemy_roles 'editor'
25+
alchemy_roles { 'editor' }
2426
end
2527
end
2628
end

0 commit comments

Comments
 (0)