Commit f1f70383 authored by Jiri Strojil's avatar Jiri Strojil

Fixed test

parent 294b7eef
Pipeline #31324 passed with stage
in 36 minutes and 32 seconds
......@@ -32,18 +32,10 @@ class SemesterProcessVolunteer < ApplicationRecord
validates_associated :hours, :semester_feedbacks, :volunteer
scope :index_joins, lambda {
joins(:semester_process).joins(:semester_process_volunteer_missions, volunteer: [:contact])
}
scope :index, lambda { |semester = nil|
if semester
joins(:semester_process).where(semester_process: semester)
.joins(:semester_process_volunteer_missions, volunteer: [:contact])
.group('semester_process_volunteers.id, contacts_volunteers.last_name')
else
index_joins
end
}
......
......@@ -32,12 +32,11 @@ class SemesterProcessVolunteerActionsTest < ApplicationSystemTestCase
## SETUP ##
# Offen/open -> @spv1
# Übernommen/responsibility taken over from superadmin1
@volunteer2 = create :volunteer_with_user
@volunteer2.contact.update(first_name: 'volunteer2', last_name: 'volunteer2')
@spv2 = create(:semester_process_volunteer, :with_mission, volunteer: @volunteer2,
semester_process: create(:semester_process))
semester_process: @semester_process)
@superadmin2 = create :user
@spv2.update(responsible: @superadmin2)
......@@ -45,7 +44,7 @@ class SemesterProcessVolunteerActionsTest < ApplicationSystemTestCase
@volunteer3 = create :volunteer_with_user
@volunteer3.contact.update(first_name: 'volunteer3', last_name: 'volunteer3')
@spv3 = create(:semester_process_volunteer, :with_mission, volunteer: @volunteer3,
semester_process: create(:semester_process))
semester_process: @semester_process)
@superadmin3 = create :user
@spv3.update(responsible: @superadmin3)
## SETUP END ##
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment