Commit 09162cea authored by Kaspar Vollenweider's avatar Kaspar Vollenweider

fix journalable not assigned and spec

parent bbb41ceb
Pipeline #35445 passed with stage
in 37 minutes and 58 seconds
......@@ -20,6 +20,7 @@ class JournalsController < ApplicationController
def create
@journal =
@journal.user = current_user
@journal.journalable = @journaled
authorize @journal
redirect_to [@journaled, Journal], make_notice
......@@ -13,7 +13,7 @@ class JournalsControllerTest < ActionDispatch::IntegrationTest
@spv = create(:semester_process_volunteer, volunteer: @volunteer)
@semester_feedback = create(:semester_feedback, :no_mission, semester_process_volunteer: @spv, volunteer: @volunteer)
get new_volunteer_journal_path(@volunteer, semester_feedback_id:
get new_volunteer_journal_path(@volunteer, sp_volunteer_id:
@journal = @controller.instance_variable_get(:@journal)
assert_equal @journal.category, 'feedback'
assert_equal @journal.title, "Semester Prozess Feedback vom #{I18n.l(@semester_feedback.created_at.to_date)}: "
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