mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
First tests in rspec, with factory_girl
This commit is contained in:
parent
accd7d1a58
commit
e3fd0c195a
11 changed files with 131 additions and 19 deletions
10
spec/factories/call_for_papers.rb
Normal file
10
spec/factories/call_for_papers.rb
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
# Read about factories at https://github.com/thoughtbot/factory_girl
|
||||
|
||||
FactoryGirl.define do
|
||||
factory :call_for_papers do
|
||||
start_date Date.today - 1
|
||||
end_date Date.today + 7
|
||||
hard_deadline Date.today + 8
|
||||
description "We call for papers"
|
||||
end
|
||||
end
|
||||
13
spec/factories/conferences.rb
Normal file
13
spec/factories/conferences.rb
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# Read about factories at https://github.com/thoughtbot/factory_girl
|
||||
|
||||
FactoryGirl.define do
|
||||
factory :conference do
|
||||
title "The dog and pony show"
|
||||
short_title "dps14"
|
||||
social_tag "dps14"
|
||||
timezone "Amsterdam"
|
||||
contact_email "admin@example.com"
|
||||
start_date Date.today
|
||||
end_date Date.tomorrow
|
||||
end
|
||||
end
|
||||
10
spec/factories/users.rb
Normal file
10
spec/factories/users.rb
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
# Read about factories at https://github.com/thoughtbot/factory_girl
|
||||
|
||||
FactoryGirl.define do
|
||||
factory :user do
|
||||
email 'example@example.com'
|
||||
password 'changeme'
|
||||
password_confirmation 'changeme'
|
||||
confirmed_at Time.now
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue