Some basic tests for user controller index

This commit is contained in:
Gopesh Tulsyan 2014-05-12 17:53:11 +05:30
parent 4955481f14
commit c97affca35
8 changed files with 31 additions and 38 deletions

View file

@ -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