mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-26 17:51:13 +08:00
Fix tests for result deletion
SCI-5429
This commit is contained in:
parent
33b68b8aa7
commit
91f016939d
2 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue