Skip to content

Commit

Permalink
make :observation_unit factory private by default #2124
Browse files Browse the repository at this point in the history
consistent with other basic factories
  • Loading branch information
stuzart committed Jan 30, 2025
1 parent 685ec25 commit b8a4b79
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/factories/observation_units.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
factory(:observation_unit) do
title { 'Observation Unit' }
description { 'very simple obs unit'}
policy { FactoryBot.create(:public_policy) }
association :contributor, factory: :person, strategy: :create
after(:build) do |a|
a.study ||= FactoryBot.create(:study, contributor: a.contributor)
Expand All @@ -11,6 +10,7 @@

factory(:min_observation_unit, parent: :observation_unit) do
title { 'A Minimal Observation Unit' }
policy { FactoryBot.create(:public_policy) }
association :study, factory: :study, strategy: :create
description { nil }
end
Expand Down
2 changes: 1 addition & 1 deletion test/unit/permissions/publishing_permissions_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ def items_for_publishing_tests(contributor = FactoryBot.create(:person))
assay = FactoryBot.create(:assay, contributor: contributor, study:
FactoryBot.create(:study, contributor: contributor, investigation: FactoryBot.create(:investigation, projects: contributor&.projects))
)
obs_unit = FactoryBot.create(:observation_unit, contributor: contributor, policy: FactoryBot.create(:private_policy), study:
obs_unit = FactoryBot.create(:observation_unit, contributor: contributor, study:
FactoryBot.create(:study, contributor: contributor, investigation: FactoryBot.create(:investigation, projects: contributor&.projects))
)
items | [study, assay, obs_unit]
Expand Down

0 comments on commit b8a4b79

Please sign in to comment.