Commit 6ff05a1d authored by Chrysanthi Lagodimou's avatar Chrysanthi Lagodimou

Show additional hours at review semester form

parent 0fa5ed58
Pipeline #32454 passed with stage
in 36 minutes and 45 seconds
......@@ -32,8 +32,8 @@ class Hour < ApplicationRecord
date.advance(months: BillingExpense::SEMESTER_LENGTH))
}
scope :within_semester, lambda {|semester |
where(meeting_date: semester.begin...semester.end)
scope :within_semester, lambda { |semester|
where(meeting_date: semester.begin...semester.end.advance(days: 1))
}
scope :since_last_submitted, lambda { |submitted_at|
......
......@@ -58,12 +58,17 @@ class SemesterFeedbackTest < ApplicationSystemTestCase
test 'you should be able to add hours on run' do
fill_in_required_feedback_fields
fill_in 'Stunden', with: 10
fill_in 'Tätigkeit / Was wurde gemacht', with: 'Deutschkurse'
check 'Ich verzichte auf die Auszahlung von Spesen.'
click_on 'Bestätigen', match: :first
@spv.reload
assert_equal Hour.last.hours, 10
assert_equal Hour.last.hourable, @spv.missions.last
assert_equal Hour.last.meeting_date, @spv.semester.last.to_date
assert_equal Hour.last.meeting_date, @spv.semester.last
within 'tbody tr:last-child' do
assert page.has_text? I18n.l(Hour.last.meeting_date)
assert page.has_text? 'Deutschkurse'
end
end
test 'iban and bank has to be filled' do
......
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