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
- 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?
= simple_form_for [@volunteer,] do |f|
= f.hidden_field :volunteer_id, value:
......@@ -52,4 +52,15 @@ class BillingExpensesTest < ApplicationSystemTestCase
assert page.has_text? 'PLZ / Ort'
assert page.has_text? 'Bank / IBAN'
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.'
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