Use TestrunMessages instead of Testrun.output when displaying output

This commit is contained in:
Sebastian Serth
2022-04-28 22:40:11 +02:00
parent db62686b75
commit 4ef7da839d
4 changed files with 11 additions and 17 deletions

View File

@ -17,4 +17,8 @@ class Testrun < ApplicationRecord
validates :exit_code, numericality: {only_integer: true, min: 0, max: 255}, allow_nil: true
validates :status, presence: true
def log
testrun_messages.output.select(:log).map(&:log).join.presence
end
end