Commit 9775f1e9 authored by Chrysanthi Lagodimou's avatar Chrysanthi Lagodimou
Browse files

billing expenses creation depends also on ga

parent 2e870c94
......@@ -7,7 +7,7 @@ nav.navbar.section-navigation
ul.list-inline
- if @volunteer.seeking_clients?
li= button_link t_title(:new, Assignment), new_assignment_path(volunteer_id: @volunteer)
- if @volunteer.assignments.any?
- if @volunteer.internal_and_started_assignments?
li
= simple_form_for [@volunteer, BillingExpense.new] do |f|
= f.hidden_field :volunteer_id, value: @volunteer.id
......
......@@ -52,4 +52,15 @@ class BillingExpensesTest < ApplicationSystemTestCase
assert page.has_text? 'PLZ / Ort'
assert page.has_text? 'Bank / IBAN'
end
test 'volunteer that has only group offers can create billing expenses' do
volunteer = create :volunteer
group_offer = create :group_offer, volunteers: [volunteer]
volunteer.group_assignments.last.update(period_start: 2.months.ago)
create :hour, hourable: group_offer, volunteer: volunteer, hours: '3', minutes: '30'
visit volunteer_path(volunteer)
click_button 'Create Billing expense'
assert page.has_text? 'Billing expense was successfully created.'
end
end
Supports Markdown
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