Skip to content

Commit

Permalink
Merge branch 'dev' into feature/#160-remove-files-course-overview
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianjost authored Jan 16, 2020
2 parents be7a61b + e7470a4 commit e9b59a1
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions db/seeds.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup).
#
# Examples:
#
# movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }])
# Character.create(name: 'Luke', movie: movies.first)
Lecture.create(name: "swt", enrollment_key: "epic", status: "created")
User.create(email: "user@example.com", password: "1234567890", password_confirmation: "1234567890")

lecturer_1 = User.create(is_student: false, email: "lecturer-1@hpi.de", password: "1234567890", password_confirmation: "1234567890")
User.create(is_student: true, email: "student-1@hpi.de", password: "1234567890", password_confirmation: "1234567890")
User.create(is_student: true, email: "student-2@hpi.de", password: "1234567890", password_confirmation: "1234567890")

course_1 = Course.create(name: "<Kurs-1>", description: "Testkurs #1", creator: lecturer_1)

Lecture.create(name: "<Created Lecture>", enrollment_key: "epic", status: "created", lecturer: lecturer_1, course: course_1, date: "2019-12-31", start_time: "2019-12-31 23:59:00", end_time: "2020-01-01 00:01:00")
Lecture.create(name: "<Running Lecture>", enrollment_key: "epic", status: "running", lecturer: lecturer_1, course: course_1, date: "2019-12-31", start_time: "2019-12-31 23:59:00", end_time: "2020-01-01 00:01:00")
Lecture.create(name: "<Ended Lecture>", enrollment_key: "epic", status: "ended", lecturer: lecturer_1, course: course_1, date: "2019-12-31", start_time: "2019-12-31 23:59:00", end_time: "2020-01-01 00:01:00")

0 comments on commit e9b59a1

Please sign in to comment.