Adopt SummerCMS v0.1.1 admin features
Datepickers on native time.Time / lagoon.Date fields, file uploads on materials, readings and class sessions managed from the course form (course_id made nullable).
This commit is contained in:
@@ -242,7 +242,7 @@ func TestSeedCommandIsIdempotent(t *testing.T) {
|
||||
if err := gdb.Preload("Course").Preload("Meeting").Where("room = ?", "101").Take(&session).Error; err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if session.StartsAt != "2030-10-05T08:00:00+02:00" || session.Course.Name != "Przedmiot przykładowy A" || session.Meeting.Number != 1 {
|
||||
if !session.StartsAt.Equal(time.Date(2030, 10, 5, 6, 0, 0, 0, time.UTC)) || session.Course.Name != "Przedmiot przykładowy A" || session.Meeting.Number != 1 {
|
||||
t.Errorf("session = %+v", session)
|
||||
}
|
||||
var stored time.Time
|
||||
@@ -441,8 +441,8 @@ func TestAPIAgainstDatabase(t *testing.T) {
|
||||
|
||||
// Materials: a published note with tags and files, a published link, a
|
||||
// draft and one scheduled for the future.
|
||||
past := models.DateTime("2026-01-15 12:00")
|
||||
future := models.DateTime("2099-01-01 12:00")
|
||||
past := time.Date(2026, 1, 15, 11, 0, 0, 0, time.UTC)
|
||||
future := time.Date(2099, 1, 1, 11, 0, 0, 0, time.UTC)
|
||||
note := models.Material{CourseID: &courseA.ID, Title: "Notatka", Type: "notatka", Body: ptr("# Nagłówek"), PublishedAt: &past}
|
||||
link := models.Material{CourseID: &courseAC.ID, Title: "Link", Type: "link", URL: ptr("https://example.test"), PublishedAt: &past}
|
||||
draft := models.Material{CourseID: &courseA.ID, Title: "Szkic", Type: "notatka"}
|
||||
|
||||
Reference in New Issue
Block a user