clarion/spec/factories/users.rb
Petko Bordjukov 574b6ec194 Introduce an administrator factory
Just a factory that handles users with an admin flag
2015-05-24 01:17:41 +03:00

17 lines
339 B
Ruby

# Read about factories at https://github.com/thoughtbot/factory_girl
FactoryGirl.define do
sequence(:email) { |n| "user-#{n}@example.org" }
factory :user do
password 'password'
password_confirmation 'password'
confirmed_at Time.now - 15.minutes
email
factory :administrator do
admin true
end
end
end