diff options
author | Gareth Rees <gareth@mysociety.org> | 2014-03-25 11:03:12 +0000 |
---|---|---|
committer | Gareth Rees <gareth@mysociety.org> | 2014-03-25 15:14:49 +0000 |
commit | 9fbca08732650407f697b7d76eee174968e15cdc (patch) | |
tree | 0c60cd57867c9b0d0793f09177a1704a2bb2f780 /spec/factories/users.rb | |
parent | 7a108776e4f45b10ef5956326fdd9c66514d1ddd (diff) |
Split factories in to individual files
Factories are loaded automatically from:
- test/factories.rb
- spec/factories.rb
- test/factories/*.rb
- spec/factories/*.rb
Keeping factories per-model helps navigation, especially when they get
more complex with traits and inheritance.
Diffstat (limited to 'spec/factories/users.rb')
-rw-r--r-- | spec/factories/users.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/factories/users.rb b/spec/factories/users.rb new file mode 100644 index 000000000..ab782fbf7 --- /dev/null +++ b/spec/factories/users.rb @@ -0,0 +1,16 @@ +FactoryGirl.define do + + factory :user do + name 'Example User' + sequence(:email) { |n| "person#{n}@example.com" } + salt "-6116981980.392287733335677" + hashed_password '6b7cd45a5f35fd83febc0452a799530398bfb6e8' # jonespassword + email_confirmed true + ban_text "" + factory :admin_user do + name 'Admin User' + admin_level 'super' + end + end + +end |