diff --git a/spec/controllers/results_controller_spec.rb b/spec/controllers/results_controller_spec.rb index 91905cf1b..6201e8989 100644 --- a/spec/controllers/results_controller_spec.rb +++ b/spec/controllers/results_controller_spec.rb @@ -14,7 +14,7 @@ describe ResultsController, type: :controller do let(:experiment) { create :experiment, project: project } let(:task) { create :my_module, name: 'test task', experiment: experiment } let(:result) do - create :result, name: 'test result', my_module: task, user: user + create :result, :archived, name: 'test result', my_module: task, user: user end let!(:result_text) do create :result_text, text: 'test text result', result: result diff --git a/spec/factories/results.rb b/spec/factories/results.rb index c0a52e451..2dee8bd5e 100644 --- a/spec/factories/results.rb +++ b/spec/factories/results.rb @@ -5,5 +5,10 @@ FactoryBot.define do name { Faker::Name.unique.name } user my_module + trait :archived do + archived { true } + archived_on { Time.zone.now } + archived_by { user } + end end end