Upgraded to Rails 4
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
# Read about factories at https://github.com/thoughtbot/factory_girl
|
||||
|
||||
FactoryGirl.define do
|
||||
FactoryBot.define do
|
||||
factory :attachment do
|
||||
name "MyString"
|
||||
# name "MyString"
|
||||
datei { Rack::Test::UploadedFile.new(File.join(Rails.root,'public','fetlogo.png'))}
|
||||
flag_titlepic false
|
||||
# flag_titlepic false
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
# Read about factories at https://github.com/thoughtbot/factory_girl
|
||||
|
||||
FactoryGirl.define do
|
||||
FactoryBot.define do
|
||||
factory :beispiel do
|
||||
name "BSP1"
|
||||
desc "sdf"
|
||||
datum Date.today
|
||||
#name "BSP1"
|
||||
#desc "sdf"
|
||||
#datum Date.today
|
||||
beispieldatei { Rack::Test::UploadedFile.new(File.join(Rails.root,'public','fetlogo.png'))}
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# Read about factories at https://github.com/thoughtbot/factory_girl
|
||||
|
||||
FactoryGirl.define do
|
||||
FactoryBot.define do
|
||||
factory :calendar do
|
||||
name "MyString"
|
||||
public false
|
||||
# name "MyString"
|
||||
# public false
|
||||
association :rubrik, factory: :rubrik
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
# Read about factories at https://github.com/thoughtbot/factory_girl
|
||||
|
||||
FactoryGirl.define do
|
||||
FactoryBot.define do
|
||||
factory :calentry do
|
||||
start 1.hours.ago
|
||||
ende "2013-08-05 21:17:10"
|
||||
summary "MyString"
|
||||
typ 1
|
||||
start {1.hours.ago}
|
||||
ende {1.days.from_now }
|
||||
summary {"MyString"}
|
||||
typ {1}
|
||||
|
||||
association :calendar, factory: :calendar
|
||||
end
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Read about factories at https://github.com/thoughtbot/factory_girl
|
||||
|
||||
FactoryGirl.define do
|
||||
FactoryBot.define do
|
||||
factory :comment do
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
FactoryGirl.define do
|
||||
FactoryBot.define do
|
||||
factory :crawlobject do
|
||||
name "MyString"
|
||||
text "MyText"
|
||||
raw "MyText"
|
||||
type 1
|
||||
schematype "MyString"
|
||||
crawlurl "MyString"
|
||||
url ""
|
||||
crawltime "2015-03-30 21:10:29"
|
||||
published_at "2015-03-30 21:10:29"
|
||||
referenced ""
|
||||
parent_id 1
|
||||
lft 1
|
||||
rgt 1
|
||||
depth 1
|
||||
children_count 1
|
||||
name {'MyString'}
|
||||
text {'MyText'}
|
||||
raw {'MyText'}
|
||||
type {1}
|
||||
schematype {"MyString"}
|
||||
crawlurl {"MyString"}
|
||||
url {""}
|
||||
crawltime {"2015-03-30 21:10:29"}
|
||||
published_at {"2015-03-30 21:10:29"}
|
||||
referenced {""}
|
||||
parent_id {1}
|
||||
lft {1}
|
||||
rgt {1}
|
||||
depth {1}
|
||||
children_count {1}
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
FactoryGirl.define do
|
||||
FactoryBot.define do
|
||||
factory :document do
|
||||
typ 1
|
||||
name "MyString"
|
||||
text "MyText"
|
||||
etherpadkey "MyString"
|
||||
parent ""
|
||||
typ {1}
|
||||
name {"MyString"}
|
||||
text {"MyText"}
|
||||
etherpadkey {"MyString"}
|
||||
parent {""}
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -1,31 +1,31 @@
|
||||
# Read about factories at https://github.com/thoughtbot/factory_girl
|
||||
|
||||
FactoryGirl.define do
|
||||
FactoryBot.define do
|
||||
factory :fetprofile do
|
||||
vorname "MyString"
|
||||
nachname "MyString"
|
||||
short "MyString"
|
||||
fetmailalias "MyString"
|
||||
desc "MyText"
|
||||
picture "MyString"
|
||||
active false
|
||||
birth_month 4
|
||||
birth_day 2
|
||||
vorname {'MyString'}
|
||||
nachname {"MyString"}
|
||||
short {"MyString"}
|
||||
fetmailalias {"MyString"}
|
||||
desc {"MyText"}
|
||||
picture {"MyString"}
|
||||
active {false}
|
||||
birth_month {4}
|
||||
birth_day {2}
|
||||
factory :fetprofile2 do
|
||||
vorname "Sarah"
|
||||
nachname "Nachname2"
|
||||
short "j"
|
||||
vorname {"Sarah"}
|
||||
nachname {"Nachname2"}
|
||||
short {"j"}
|
||||
end
|
||||
factory :fetprofile3 do
|
||||
vorname "Thomas"
|
||||
nachname "Mustermann"
|
||||
vorname {"Thomas"}
|
||||
nachname {"Mustermann"}
|
||||
end
|
||||
factory :fetprofile_withadress do
|
||||
street "some street"
|
||||
plz "1231"
|
||||
city "vienna"
|
||||
telnr "sdf tel nummer"
|
||||
hdynr "sdf hdy nummer"
|
||||
street {"some street"}
|
||||
plz {"1231"}
|
||||
city {"vienna"}
|
||||
telnr {"sdf tel nummer"}
|
||||
hdynr {"sdf hdy nummer"}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
# Read about factories at https://github.com/thoughtbot/factory_girl
|
||||
|
||||
FactoryGirl.define do
|
||||
FactoryBot.define do
|
||||
factory :fetznedition do
|
||||
title "MyString"
|
||||
desc "MyText"
|
||||
datum "2013-08-19"
|
||||
datei "MyString"
|
||||
title {"MyString"}
|
||||
desc {"MyText"}
|
||||
datum {"2013-08-19"}
|
||||
datei {"MyString"}
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
# Read about factories at https://github.com/thoughtbot/factory_girl
|
||||
|
||||
FactoryGirl.define do
|
||||
FactoryBot.define do
|
||||
factory :foto do
|
||||
title "MyString"
|
||||
desc "MyText"
|
||||
gallery_id 1
|
||||
datei "MyString"
|
||||
title {"MyString"}
|
||||
desc {"MyText"}
|
||||
gallery_id {1}
|
||||
datei {"MyString"}
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# Read about factories at https://github.com/thoughtbot/factory_girl
|
||||
|
||||
FactoryGirl.define do
|
||||
FactoryBot.define do
|
||||
factory :frage do
|
||||
title "MyString"
|
||||
text "MyText"
|
||||
title {"MyString"}
|
||||
text {"MyText"}
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# Read about factories at https://github.com/thoughtbot/factory_girl
|
||||
|
||||
FactoryGirl.define do
|
||||
FactoryBot.define do
|
||||
factory :gallery do
|
||||
name "MyString"
|
||||
desc "MyText"
|
||||
datum "2013-08-19"
|
||||
name {"MyString"}
|
||||
desc {"MyText"}
|
||||
datum {"2013-08-19"}
|
||||
end
|
||||
end
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
# Read about factories at https://github.com/thoughtbot/factory_girl
|
||||
|
||||
FactoryGirl.define do
|
||||
FactoryBot.define do
|
||||
factory :gremium do
|
||||
name "Kommission"
|
||||
desc "Das ist eine Kommission die sich mit irgendwas beschäftigt"
|
||||
typ 1
|
||||
name {"Kommission"}
|
||||
desc {"Das ist eine Kommission die sich mit irgendwas beschäftigt"}
|
||||
typ {1}
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
FactoryGirl.define do
|
||||
FactoryBot.define do
|
||||
factory :key do
|
||||
uuid "MyString"
|
||||
expire "2015-06-08 21:32:56"
|
||||
parent ""
|
||||
type 1
|
||||
user_id 1
|
||||
is_valid false
|
||||
uuid {"MyString"}
|
||||
expire {"2015-06-08 21:32:56"}
|
||||
parent {""}
|
||||
type {1}
|
||||
user_id {1}
|
||||
is_valid {false}
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
# Read about factories at https://github.com/thoughtbot/factory_girl
|
||||
|
||||
FactoryGirl.define do
|
||||
FactoryBot.define do
|
||||
factory :lecturer do
|
||||
name "MyString"
|
||||
email "MyString"
|
||||
oid 1
|
||||
picture "MyString"
|
||||
name {"MyString"}
|
||||
email {"MyString"}
|
||||
oid {1}
|
||||
picture {"MyString"}
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
# Read about factories at https://github.com/thoughtbot/factory_girl
|
||||
|
||||
FactoryGirl.define do
|
||||
FactoryBot.define do
|
||||
factory :lva do
|
||||
name "Vorlesung 1"
|
||||
desc "Das ist eine Vorlesung"
|
||||
lvanr "001.002"
|
||||
ects 3
|
||||
stunden 2
|
||||
pruefungsinformation "sdf"
|
||||
lernaufwand "sdf"
|
||||
typ 'VO'
|
||||
name {"Vorlesung 1"}
|
||||
desc {"Das ist eine Vorlesung"}
|
||||
lvanr { "001.002"}
|
||||
ects {3}
|
||||
stunden {2}
|
||||
pruefungsinformation {"sdf"}
|
||||
lernaufwand {"sdf"}
|
||||
typ {'VO'}
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
FactoryGirl.define do
|
||||
FactoryBot.define do
|
||||
factory :meeting do
|
||||
name "MyString"
|
||||
desc "MyText"
|
||||
parent nil
|
||||
intern false
|
||||
meetingtyp nil
|
||||
name {"MyString"}
|
||||
desc {"MyText"}
|
||||
parent {nil}
|
||||
intern {false}
|
||||
meetingtyp {nil}
|
||||
# association :calentry, factory: :calentry
|
||||
|
||||
after(:build) do |c|
|
||||
c.calentry=FactoryGirl.build(:calentry, typ: 2)
|
||||
c.calentry=FactoryBot.build(:calentry, typ: 2)
|
||||
|
||||
end
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
FactoryGirl.define do
|
||||
FactoryBot.define do
|
||||
factory :meetingtyp do
|
||||
name "MyString"
|
||||
desc "MyText"
|
||||
agendaintern false
|
||||
protocolintern false
|
||||
name {"MyString"}
|
||||
desc {"MyText"}
|
||||
agendaintern {false}
|
||||
protocolintern {false}
|
||||
association :rubrik, factory: :rubrik
|
||||
end
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
# Read about factories at https://github.com/thoughtbot/factory_girl
|
||||
|
||||
FactoryGirl.define do
|
||||
FactoryBot.define do
|
||||
factory :membership do
|
||||
gremium_id 1
|
||||
fetprofile_id 1
|
||||
start "2013-08-19"
|
||||
stop "2013-08-23"
|
||||
typ 1
|
||||
gremium_id {1}
|
||||
fetprofile_id {1}
|
||||
start {"2013-08-19"}
|
||||
stop {"2013-08-23"}
|
||||
typ {1}
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
# Read about factories at https://github.com/thoughtbot/factory_girl
|
||||
|
||||
FactoryGirl.define do
|
||||
FactoryBot.define do
|
||||
factory :modulgruppe do
|
||||
typ "Pflicht"
|
||||
phase 1
|
||||
name "Pflichtmodule 1"
|
||||
desc "ASDFASDF"
|
||||
typ {"Pflicht"}
|
||||
phase {1}
|
||||
name {"Pflichtmodule 1"}
|
||||
desc {"ASDFASDF"}
|
||||
factory :other_modulgruppe do
|
||||
name "PFlichtmodule 2"
|
||||
desc "sdafaswdfsfr"
|
||||
name {"PFlichtmodule 2"}
|
||||
desc {"sdafaswdfsfr"}
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
# Read about factories at https://github.com/thoughtbot/factory_girl
|
||||
|
||||
FactoryGirl.define do
|
||||
FactoryBot.define do
|
||||
|
||||
factory :modul do
|
||||
name ""
|
||||
factory :other_modul do
|
||||
name "Modul 1"
|
||||
end
|
||||
name {""}
|
||||
factory :other_modul do
|
||||
name {"Modul 1"}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
FactoryGirl.define do
|
||||
FactoryBot.define do
|
||||
sequence (:title) {|n| "Wichtige Neuigkeit #{n}"}
|
||||
sequence (:text) {|n| "Wichtiger text #{n}"}
|
||||
factory :neuigkeit do
|
||||
title
|
||||
text
|
||||
datum 1.days.ago
|
||||
datum {1.days.ago}
|
||||
association :author, factory: :user
|
||||
|
||||
trait :with_rubrik do
|
||||
@@ -15,14 +15,14 @@ FactoryGirl.define do
|
||||
end
|
||||
trait :with_meeting do
|
||||
after(:build) do |n|
|
||||
n.meeting=FactoryGirl.build(:meeting, :with_meetingtyp)
|
||||
n.meeting=FactoryBot.build(:meeting, :with_meetingtyp)
|
||||
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
trait :unpublished do
|
||||
datum nil
|
||||
datum {nil}
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
# Read about factories at https://github.com/thoughtbot/factory_girl
|
||||
|
||||
FactoryGirl.define do
|
||||
FactoryBot.define do
|
||||
factory :nlink do
|
||||
title "MyString"
|
||||
sort 1
|
||||
neuigkeit_id 1
|
||||
link_id 1
|
||||
link_type "MyString"
|
||||
title {"MyString"}
|
||||
sort {1}
|
||||
neuigkeit_id {1}
|
||||
link_id {1}
|
||||
link_type {"MyString"}
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
FactoryGirl.define do
|
||||
FactoryBot.define do
|
||||
factory :rubrik do
|
||||
name "Allgemeine"
|
||||
desc "Allgemeine Test News"
|
||||
public true
|
||||
name {"Allgemeine"}
|
||||
desc {"Allgemeine Test News"}
|
||||
public {true}
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
|
||||
FactoryGirl.define do
|
||||
FactoryBot.define do
|
||||
factory :semester do
|
||||
nummer 2
|
||||
nummer {2}
|
||||
|
||||
factory :zero_semester do
|
||||
|
||||
nummer 0
|
||||
nummer {0}
|
||||
end
|
||||
factory :first_semester do
|
||||
|
||||
nummer 1
|
||||
nummer {1}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
# Read about factories at https://github.com/thoughtbot/factory_girl
|
||||
|
||||
|
||||
FactoryGirl.define do
|
||||
FactoryBot.define do
|
||||
factory :studium do
|
||||
zahl "066506"
|
||||
name "Automatisierung"
|
||||
desc "TEST DESC"
|
||||
typ "Master"
|
||||
zahl {"066506"}
|
||||
name {"Automatisierung"}
|
||||
desc {"TEST DESC"}
|
||||
typ {"Master"}
|
||||
|
||||
factory :other_studium do
|
||||
name "Telecommunication"
|
||||
desc "frueher Telekommunikation"
|
||||
zahl "066507"
|
||||
typ "Master"
|
||||
name {"Telecommunication"}
|
||||
desc {"frueher Telekommunikation"}
|
||||
zahl {"066507"}
|
||||
typ {"Master"}
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Read about factories at https://github.com/thoughtbot/factory_girl
|
||||
|
||||
|
||||
FactoryGirl.define do
|
||||
FactoryBot.define do
|
||||
factory :studium do
|
||||
zahl "066.506"
|
||||
name "Automatisierung"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
FactoryGirl.define do
|
||||
FactoryBot.define do
|
||||
factory :survey_answer, :class => 'Survey::Answer' do
|
||||
choice nil
|
||||
user nil
|
||||
choice {nil}
|
||||
user {nil}
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
FactoryGirl.define do
|
||||
FactoryBot.define do
|
||||
factory :survey_choice, :class => 'Survey::Choice' do
|
||||
text "MyString"
|
||||
question nil
|
||||
sort 1
|
||||
picture "MyString"
|
||||
text {"MyString"}
|
||||
question {nil}
|
||||
sort {1}
|
||||
picture {"MyString"}
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
FactoryGirl.define do
|
||||
FactoryBot.define do
|
||||
factory :survey_question, :class => 'Survey::Question' do
|
||||
title "MyString"
|
||||
text "MyText"
|
||||
typ 1
|
||||
title {"MyString"}
|
||||
text {"MyText"}
|
||||
typ {1}
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# Read about factories at https://github.com/thoughtbot/factory_girl
|
||||
|
||||
FactoryGirl.define do
|
||||
FactoryBot.define do
|
||||
factory :thema do
|
||||
title "MyString"
|
||||
text "MyText"
|
||||
title {"MyString"}
|
||||
text {"MyText"}
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# Read about factories at https://github.com/thoughtbot/factory_girl
|
||||
|
||||
FactoryGirl.define do
|
||||
FactoryBot.define do
|
||||
factory :themengruppe, :class => 'Themengruppe' do
|
||||
title "MyString"
|
||||
text "MyText"
|
||||
title {"MyString"}
|
||||
text {"MyText"}
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
FactoryGirl.define do
|
||||
FactoryBot.define do
|
||||
sequence (:email) {|n| "testuser#{n}@fet.at"}
|
||||
factory :user do
|
||||
email
|
||||
password "password"
|
||||
password_confirmation "password"
|
||||
password {"password"}
|
||||
password_confirmation {"password"}
|
||||
factory :other_user do
|
||||
email "othertest@test.at"
|
||||
email {"othertest@test.at"}
|
||||
end
|
||||
trait :fetuser do
|
||||
after(:create) do |user|
|
||||
|
||||
Reference in New Issue
Block a user