Verified Commit 903a9956 authored by Kaspar Vollenweider's avatar Kaspar Vollenweider 👻
Browse files

fix deactivate and activate test

parent 51f5ac51
......@@ -93,10 +93,11 @@ table.table.table-striped
= link_to t_action(:show), group_offer_path(offer)
= link_to t('download'), group_offer_path(offer, format: :pdf)
= link_to t_action(:edit), edit_group_offer_path(offer)
- if offer.period_end.blank? && offer.endable?
- if offer.period_end.blank?
= link_to "#{ offer.active? ? t('.deactivate') : t('.activate') }",
change_active_state_group_offer_path(offer), method: :put, remote: :true
= link_to_if(policy(offer).initiate_termination?, 'Beenden', initiate_termination_group_offer_path(offer)) { '' }
= link_to_if(policy(offer).initiate_termination? && offer.endable?,
'Beenden', initiate_termination_group_offer_path(offer)) { '' }
nav.navbar.section-navigation
......
......@@ -62,7 +62,7 @@ class GroupOffersTest < ApplicationSystemTestCase
refute page.has_link? 'Deactivate'
end
test 'group offer can be activated' do
test 'group_offer_can_be_activated' do
group_offer = create :group_offer, active: false
login_as create(:user)
visit group_offers_path
......
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