Some basic tests for user controller index
This commit is contained in:
parent
4955481f14
commit
c97affca35
8 changed files with 31 additions and 38 deletions
|
|
@ -7,4 +7,11 @@ FactoryGirl.define do
|
|||
password_confirmation 'changeme'
|
||||
confirmed_at Time.now
|
||||
end
|
||||
factory :admin, class: User do
|
||||
sequence(:email) {|n|'gopesh#{n}@exampleco.in'}
|
||||
password 'changeme'
|
||||
password_confirmation 'changeme'
|
||||
confirmed_at Time.now
|
||||
after(:create) { |user| user.role_ids = [3] }
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue