Commit a681c92d authored by Chrysanthi Lagodimou's avatar Chrysanthi Lagodimou

Merge branch 'changes/add-integration-tests-for-review-semester' into 'develop'

Review semester with multiple assignments intergration test

See merge request !852
parents 8d231538 2f80a08f
Pipeline #31299 passed with stage
in 38 minutes and 3 seconds
require 'test_helper'
class ReviewSemesterWithMultipleAssignmentsTest < ActionDispatch::IntegrationTest
def setup
@volunteer = create :volunteer
create :assignment, volunteer: @volunteer, period_start: time_z(2017, 12, 2)
create :group_assignment, volunteer: @volunteer, period_start: time_z(2017, 12, 2)
login_as create :user
end
test 'review semester should contain all missions' do
params = {
semester_process: {
kind: 'mail',
semester: '2018, 1',
subject: 'subject',
body: 'body',
semester_process_volunteers_attributes: {
0 => {
selected: 0,
volunteer_id: @volunteer.id
}
}
},
commit: 'Semester Prozess erfassen',
action: 'create',
semester: '2018, 1'
}
assert_difference 'SemesterProcessVolunteer.count', 1 do
post semester_processes_path, params: params
end
assert_equal SemesterProcessVolunteer.last.missions.count, 2
end
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