Fix tests for result deletion

SCI-5429
This commit is contained in:
Urban Rotnik 2021-01-20 09:01:26 +01:00
parent 33b68b8aa7
commit 91f016939d
2 changed files with 6 additions and 1 deletions

View file

@ -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

View file

@ -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