Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-source
aoz-003
Commits
f1f70383
Commit
f1f70383
authored
Nov 20, 2018
by
Jiri Strojil
Browse files
Fixed test
parent
294b7eef
Pipeline
#31324
passed with stage
in 36 minutes and 32 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
app/models/semester_process_volunteer.rb
View file @
f1f70383
...
...
@@ -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
}
...
...
test/system/semester_process_volunteer_actions_test.rb
View file @
f1f70383
...
...
@@ -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 ##
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment