Skip to content

Running an user_defined_test file errors due to missing feedback_message #3014

Open
@MrSerth

Description

@MrSerth

In the current setup, running a user_defined_test (as test action) doesn't return any output. This is due to an implicit necessary feedback_message, which cannot and should not be configured for user_defined_test files.

An exception occurs in this line:

else
# The render_markdown method from application_helper.rb is not available in model classes.
ActionController::Base.helpers.sanitize(
Kramdown::Document.new(file.feedback_message, smart_quotes: 'apos,apos,quot,quot').to_html,
tags: %w[strong],
attributes: []
)

Most likely, Kramdown::Document.new doesn't accept file.feedback_message to be nil. A potential solution would be to switch the else to:

elsif output[:file_role] != 'user_defined_test'

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugrubyPull requests that update Ruby code

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions