From 11e9e7b9465ba9b0aae65ba4d3ac8f62116f8005 Mon Sep 17 00:00:00 2001 From: Finn Bacall Date: Wed, 10 Jan 2024 09:33:22 +0000 Subject: [PATCH 1/2] Always use `fixtures :all` to address intermittent test failures #1182 ...caused by missing associations etc. --- test/functional/admin_annotations_test.rb | 1 - test/functional/admin_controller_test.rb | 1 - test/functional/assay_types_controller_test.rb | 1 - test/functional/assays_controller_test.rb | 1 - test/functional/attributions_test.rb | 1 - test/functional/collection_items_controller_test.rb | 1 - test/functional/collections_controller_test.rb | 1 - test/functional/content_blobs_controller_test.rb | 1 - test/functional/countries_controller_test.rb | 1 - test/functional/data_files_controller_test.rb | 1 - test/functional/documents_controller_test.rb | 1 - test/functional/events_controller_test.rb | 1 - test/functional/favourite_groups_controller_test.rb | 1 - test/functional/favourites_controller_test.rb | 1 - test/functional/file_templates_controller_test.rb | 1 - test/functional/ga4gh/trs/v2/general_controller_test.rb | 1 - .../ga4gh/trs/v2/tool_versions_controller_test.rb | 1 - test/functional/ga4gh/trs/v2/tools_controller_test.rb | 1 - test/functional/help_attachments_controller_test.rb | 1 - test/functional/help_documents_controller_test.rb | 1 - test/functional/help_images_controller_test.rb | 1 - test/functional/homes_controller_test.rb | 1 - test/functional/human_diseases_controller_test.rb | 1 - test/functional/institutions_controller_test.rb | 1 - test/functional/investigations_controller_test.rb | 1 - test/functional/isa_assays_controller_test.rb | 2 -- test/functional/isa_studies_controller_test.rb | 2 -- test/functional/model_images_controller_test.rb | 1 - test/functional/models_controller_test.rb | 1 - test/functional/openbis_experiments_controller_test.rb | 1 - test/functional/openbis_zamples_controller_test.rb | 1 - test/functional/organisms_controller_test.rb | 1 - test/functional/people_controller_test.rb | 1 - test/functional/personal_tags_test.rb | 1 - test/functional/placeholders_controller_test.rb | 1 - test/functional/projects_controller_test.rb | 1 - test/functional/publications_controller_test.rb | 2 -- test/functional/publishing/batch_publishing_test.rb | 1 - test/functional/publishing/gatekeeper_publish_test.rb | 1 - test/functional/publishing/single_publishing_test.rb | 1 - test/functional/sessions_controller_test.rb | 1 - test/functional/sharing/batch_sharing_change_test.rb | 1 - test/functional/site_announcements_controller_test.rb | 1 - test/functional/sops_annotation_test.rb | 1 - test/functional/sops_controller_test.rb | 1 - test/functional/strains_controller_test.rb | 1 - test/functional/studies_controller_test.rb | 1 - test/functional/tags_controller_test.rb | 1 - test/functional/technology_types_controller_test.rb | 1 - test/functional/users_controller_test.rb | 1 - test/functional/uuids_controller_test.rb | 1 - test/integration/ga4gh_trs_api_test.rb | 1 - test/integration/isa_exporter_compliance_test.rb | 1 - test/integration/nels_integration_test.rb | 1 - test/integration/omniauth_test.rb | 1 - test/integration/registration_state_test.rb | 1 - test/test_helper.rb | 2 +- test/unit/assay_class_test.rb | 1 - test/unit/assay_test.rb | 1 - test/unit/asset_test.rb | 1 - test/unit/bio_schema/data_dump_test.rb | 1 - test/unit/collection_test.rb | 1 - test/unit/content_blob_test.rb | 1 - test/unit/data_file_test.rb | 1 - test/unit/datacite_metadata_test.rb | 1 - test/unit/document_test.rb | 1 - test/unit/event_test.rb | 1 - test/unit/favourite_test.rb | 1 - test/unit/file_template_test.rb | 1 - test/unit/help_document_test.rb | 1 - test/unit/human_disease_test.rb | 1 - test/unit/institution_test.rb | 2 -- test/unit/investigation_test.rb | 1 - test/unit/jobs/auth_lookup_job_test.rb | 8 ++++---- test/unit/jobs/remove_subscriptions_for_item_job_test.rb | 1 - test/unit/jobs/set_subscriptions_for_item_job_test.rb | 1 - test/unit/mailer_test.rb | 1 - test/unit/model_format_test.rb | 1 - test/unit/model_test.rb | 1 - test/unit/model_type_test.rb | 1 - test/unit/notifiee_info_test.rb | 1 - test/unit/organism_test.rb | 1 - test/unit/permission_test.rb | 1 - test/unit/permissions/auth_lookup_table_test.rb | 1 - test/unit/permissions/authorization_test.rb | 1 - test/unit/permissions/policy_based_auth_test.rb | 1 - test/unit/person_test.rb | 1 - test/unit/policy_test.rb | 1 - test/unit/project_test.rb | 1 - test/unit/publication_test.rb | 1 - test/unit/recommended_model_environment_test.rb | 1 - test/unit/site_announcements_test.rb | 1 - test/unit/snapshot_test.rb | 1 - test/unit/sop_test.rb | 1 - test/unit/strain_test.rb | 1 - test/unit/study_test.rb | 1 - test/unit/subscription_test.rb | 1 - test/unit/treeview_builder_test.rb | 1 - test/unit/user_test.rb | 1 - test/unit/worksheet_test.rb | 1 - 100 files changed, 5 insertions(+), 107 deletions(-) diff --git a/test/functional/admin_annotations_test.rb b/test/functional/admin_annotations_test.rb index 716b1841c5..435263feb6 100644 --- a/test/functional/admin_annotations_test.rb +++ b/test/functional/admin_annotations_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class AdminAnnotationsTest < ActionController::TestCase - fixtures :all include AuthenticatedTestHelper diff --git a/test/functional/admin_controller_test.rb b/test/functional/admin_controller_test.rb index f342837174..b117bdba01 100644 --- a/test/functional/admin_controller_test.rb +++ b/test/functional/admin_controller_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class AdminControllerTest < ActionController::TestCase - fixtures :all include AuthenticatedTestHelper diff --git a/test/functional/assay_types_controller_test.rb b/test/functional/assay_types_controller_test.rb index 4086bff0bf..0f2f15dfbf 100644 --- a/test/functional/assay_types_controller_test.rb +++ b/test/functional/assay_types_controller_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class AssayTypesControllerTest < ActionController::TestCase - fixtures :all include AuthenticatedTestHelper diff --git a/test/functional/assays_controller_test.rb b/test/functional/assays_controller_test.rb index 4f22f35a3a..eb7ef89424 100644 --- a/test/functional/assays_controller_test.rb +++ b/test/functional/assays_controller_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class AssaysControllerTest < ActionController::TestCase - fixtures :all include AuthenticatedTestHelper include SharingFormTestHelper diff --git a/test/functional/attributions_test.rb b/test/functional/attributions_test.rb index 8ef426a4d4..50d4493d17 100644 --- a/test/functional/attributions_test.rb +++ b/test/functional/attributions_test.rb @@ -4,7 +4,6 @@ class AttributionsTest < ActionController::TestCase # use SopsController, because attributions don't have their own controller tests SopsController - fixtures :all include AuthenticatedTestHelper include SharingFormTestHelper diff --git a/test/functional/collection_items_controller_test.rb b/test/functional/collection_items_controller_test.rb index 16c7948387..281e83a92f 100644 --- a/test/functional/collection_items_controller_test.rb +++ b/test/functional/collection_items_controller_test.rb @@ -2,7 +2,6 @@ require 'minitest/mock' class CollectionItemsControllerTest < ActionController::TestCase - fixtures :all include AuthenticatedTestHelper diff --git a/test/functional/collections_controller_test.rb b/test/functional/collections_controller_test.rb index 73b86aafe7..13075a6df5 100644 --- a/test/functional/collections_controller_test.rb +++ b/test/functional/collections_controller_test.rb @@ -2,7 +2,6 @@ require 'minitest/mock' class CollectionsControllerTest < ActionController::TestCase - fixtures :all include AuthenticatedTestHelper include SharingFormTestHelper diff --git a/test/functional/content_blobs_controller_test.rb b/test/functional/content_blobs_controller_test.rb index d0e67fc9bd..8505592be8 100644 --- a/test/functional/content_blobs_controller_test.rb +++ b/test/functional/content_blobs_controller_test.rb @@ -3,7 +3,6 @@ require 'private_address_check' class ContentBlobsControllerTest < ActionController::TestCase - fixtures :all include AuthenticatedTestHelper diff --git a/test/functional/countries_controller_test.rb b/test/functional/countries_controller_test.rb index 5ceebac558..32acdca321 100644 --- a/test/functional/countries_controller_test.rb +++ b/test/functional/countries_controller_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class CountriesControllerTest < ActionController::TestCase - fixtures :all include AuthenticatedTestHelper diff --git a/test/functional/data_files_controller_test.rb b/test/functional/data_files_controller_test.rb index 7f9bc644c3..74608913d6 100644 --- a/test/functional/data_files_controller_test.rb +++ b/test/functional/data_files_controller_test.rb @@ -5,7 +5,6 @@ class DataFilesControllerTest < ActionController::TestCase - fixtures :all include AuthenticatedTestHelper include RdfTestCases diff --git a/test/functional/documents_controller_test.rb b/test/functional/documents_controller_test.rb index eaa3d627b5..6817df840c 100644 --- a/test/functional/documents_controller_test.rb +++ b/test/functional/documents_controller_test.rb @@ -2,7 +2,6 @@ require 'minitest/mock' class DocumentsControllerTest < ActionController::TestCase - fixtures :all include AuthenticatedTestHelper include SharingFormTestHelper diff --git a/test/functional/events_controller_test.rb b/test/functional/events_controller_test.rb index 92a09ae1a2..554f9a2b12 100644 --- a/test/functional/events_controller_test.rb +++ b/test/functional/events_controller_test.rb @@ -71,7 +71,6 @@ def test_title assert_response :success end - fixtures :all test 'should destroy Event' do assert_difference('Event.count', -1) do delete :destroy, params: { id: events(:event_with_no_files) } diff --git a/test/functional/favourite_groups_controller_test.rb b/test/functional/favourite_groups_controller_test.rb index 008b037b37..2bb65d2d2c 100644 --- a/test/functional/favourite_groups_controller_test.rb +++ b/test/functional/favourite_groups_controller_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class FavouriteGroupsControllerTest < ActionController::TestCase - fixtures :all include AuthenticatedTestHelper diff --git a/test/functional/favourites_controller_test.rb b/test/functional/favourites_controller_test.rb index 65c1efade7..e2c878e7f9 100644 --- a/test/functional/favourites_controller_test.rb +++ b/test/functional/favourites_controller_test.rb @@ -4,7 +4,6 @@ class FavouritesControllerTest < ActionController::TestCase include AuthenticatedTestHelper include FavouritesHelper - fixtures :users, :favourites, :projects, :people, :institutions, :saved_searches def setup @person = FactoryBot.create(:person) diff --git a/test/functional/file_templates_controller_test.rb b/test/functional/file_templates_controller_test.rb index 46e1e6c818..c1295fbe15 100644 --- a/test/functional/file_templates_controller_test.rb +++ b/test/functional/file_templates_controller_test.rb @@ -2,7 +2,6 @@ require 'minitest/mock' class FileTemplatesControllerTest < ActionController::TestCase - fixtures :all include AuthenticatedTestHelper include SharingFormTestHelper diff --git a/test/functional/ga4gh/trs/v2/general_controller_test.rb b/test/functional/ga4gh/trs/v2/general_controller_test.rb index bc267e7cb3..7c123f100b 100644 --- a/test/functional/ga4gh/trs/v2/general_controller_test.rb +++ b/test/functional/ga4gh/trs/v2/general_controller_test.rb @@ -4,7 +4,6 @@ module Trs module V2 class GeneralControllerTest < ActionController::TestCase include AuthenticatedTestHelper - fixtures :users, :people test 'should get service info' do get :service_info diff --git a/test/functional/ga4gh/trs/v2/tool_versions_controller_test.rb b/test/functional/ga4gh/trs/v2/tool_versions_controller_test.rb index e8bc3446d6..71695f2bf3 100644 --- a/test/functional/ga4gh/trs/v2/tool_versions_controller_test.rb +++ b/test/functional/ga4gh/trs/v2/tool_versions_controller_test.rb @@ -4,7 +4,6 @@ module Trs module V2 class ToolVersionsControllerTest < ActionController::TestCase include AuthenticatedTestHelper - fixtures :users, :people test 'should list workflow versions as tool versions' do workflow = FactoryBot.create(:workflow, policy: FactoryBot.create(:public_policy)) diff --git a/test/functional/ga4gh/trs/v2/tools_controller_test.rb b/test/functional/ga4gh/trs/v2/tools_controller_test.rb index 98177af41e..1826315f9c 100644 --- a/test/functional/ga4gh/trs/v2/tools_controller_test.rb +++ b/test/functional/ga4gh/trs/v2/tools_controller_test.rb @@ -4,7 +4,6 @@ module Trs module V2 class ToolsControllerTest < ActionController::TestCase include AuthenticatedTestHelper - fixtures :users, :people test 'should not work if disabled' do with_config_value(:ga4gh_trs_api_enabled, false) do diff --git a/test/functional/help_attachments_controller_test.rb b/test/functional/help_attachments_controller_test.rb index 6577a37689..a27626eba0 100644 --- a/test/functional/help_attachments_controller_test.rb +++ b/test/functional/help_attachments_controller_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class HelpAttachmentsControllerTest < ActionController::TestCase - fixtures :all include AuthenticatedTestHelper diff --git a/test/functional/help_documents_controller_test.rb b/test/functional/help_documents_controller_test.rb index 99cb3a5e27..99213e5b2a 100644 --- a/test/functional/help_documents_controller_test.rb +++ b/test/functional/help_documents_controller_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class HelpDocumentsControllerTest < ActionController::TestCase - fixtures :all include AuthenticatedTestHelper diff --git a/test/functional/help_images_controller_test.rb b/test/functional/help_images_controller_test.rb index ca34c5592e..dcee697524 100644 --- a/test/functional/help_images_controller_test.rb +++ b/test/functional/help_images_controller_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class HelpImagesControllerTest < ActionController::TestCase - fixtures :all include AuthenticatedTestHelper diff --git a/test/functional/homes_controller_test.rb b/test/functional/homes_controller_test.rb index 6cd96cf2c5..78ad96952e 100644 --- a/test/functional/homes_controller_test.rb +++ b/test/functional/homes_controller_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class HomesControllerTest < ActionController::TestCase - fixtures :all include AuthenticatedTestHelper include HomesHelper diff --git a/test/functional/human_diseases_controller_test.rb b/test/functional/human_diseases_controller_test.rb index 3a95abce74..a36d6828df 100644 --- a/test/functional/human_diseases_controller_test.rb +++ b/test/functional/human_diseases_controller_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class HumanDiseasesControllerTest < ActionController::TestCase - fixtures :all include AuthenticatedTestHelper diff --git a/test/functional/institutions_controller_test.rb b/test/functional/institutions_controller_test.rb index 8f28894ff1..2bfb25c87b 100644 --- a/test/functional/institutions_controller_test.rb +++ b/test/functional/institutions_controller_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class InstitutionsControllerTest < ActionController::TestCase - fixtures :all include AuthenticatedTestHelper diff --git a/test/functional/investigations_controller_test.rb b/test/functional/investigations_controller_test.rb index aad561da0f..d2dd66c8c8 100644 --- a/test/functional/investigations_controller_test.rb +++ b/test/functional/investigations_controller_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class InvestigationsControllerTest < ActionController::TestCase - fixtures :all include AuthenticatedTestHelper include SharingFormTestHelper diff --git a/test/functional/isa_assays_controller_test.rb b/test/functional/isa_assays_controller_test.rb index 9dec2be2e4..4723289476 100644 --- a/test/functional/isa_assays_controller_test.rb +++ b/test/functional/isa_assays_controller_test.rb @@ -1,8 +1,6 @@ require 'test_helper' class ISAAssaysControllerTest < ActionController::TestCase - fixtures :all - include AuthenticatedTestHelper include SharingFormTestHelper diff --git a/test/functional/isa_studies_controller_test.rb b/test/functional/isa_studies_controller_test.rb index ee7f89f1a0..7a37db65e8 100644 --- a/test/functional/isa_studies_controller_test.rb +++ b/test/functional/isa_studies_controller_test.rb @@ -1,8 +1,6 @@ require 'test_helper' class ISAStudiesControllerTest < ActionController::TestCase - fixtures :all - include AuthenticatedTestHelper def setup diff --git a/test/functional/model_images_controller_test.rb b/test/functional/model_images_controller_test.rb index 3b3a39ada0..25e5b81182 100644 --- a/test/functional/model_images_controller_test.rb +++ b/test/functional/model_images_controller_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class ModelImagesControllerTest < ActionController::TestCase - fixtures :models, :users include AuthenticatedTestHelper diff --git a/test/functional/models_controller_test.rb b/test/functional/models_controller_test.rb index 76d2d5f4f4..8aa6a06bef 100644 --- a/test/functional/models_controller_test.rb +++ b/test/functional/models_controller_test.rb @@ -2,7 +2,6 @@ require 'minitest/mock' class ModelsControllerTest < ActionController::TestCase - fixtures :all include AuthenticatedTestHelper include SharingFormTestHelper diff --git a/test/functional/openbis_experiments_controller_test.rb b/test/functional/openbis_experiments_controller_test.rb index 09daa2df7a..553a1ac189 100644 --- a/test/functional/openbis_experiments_controller_test.rb +++ b/test/functional/openbis_experiments_controller_test.rb @@ -2,7 +2,6 @@ require 'openbis_test_helper' class OpenbisExperimentsControllerTest < ActionController::TestCase - #fixtures :all include AuthenticatedTestHelper def setup diff --git a/test/functional/openbis_zamples_controller_test.rb b/test/functional/openbis_zamples_controller_test.rb index f9b0e5f4e1..8681663ebe 100644 --- a/test/functional/openbis_zamples_controller_test.rb +++ b/test/functional/openbis_zamples_controller_test.rb @@ -4,7 +4,6 @@ #include SharingFormTestHelper class OpenbisZamplesControllerTest < ActionController::TestCase - #fixtures :all include AuthenticatedTestHelper def setup diff --git a/test/functional/organisms_controller_test.rb b/test/functional/organisms_controller_test.rb index d387403f87..085bd79241 100644 --- a/test/functional/organisms_controller_test.rb +++ b/test/functional/organisms_controller_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class OrganismsControllerTest < ActionController::TestCase - fixtures :all include AuthenticatedTestHelper include RdfTestCases diff --git a/test/functional/people_controller_test.rb b/test/functional/people_controller_test.rb index 8a3751ab40..38140390a1 100644 --- a/test/functional/people_controller_test.rb +++ b/test/functional/people_controller_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class PeopleControllerTest < ActionController::TestCase - fixtures :people, :users, :projects, :work_groups, :group_memberships, :institutions, :roles include AuthenticatedTestHelper include ApplicationHelper diff --git a/test/functional/personal_tags_test.rb b/test/functional/personal_tags_test.rb index f6721451a9..8a0ac7ee86 100644 --- a/test/functional/personal_tags_test.rb +++ b/test/functional/personal_tags_test.rb @@ -4,7 +4,6 @@ class PersonalTagsTest < ActionController::TestCase tests PeopleController - fixtures :all include AuthenticatedTestHelper diff --git a/test/functional/placeholders_controller_test.rb b/test/functional/placeholders_controller_test.rb index dbc3086893..b3546e9c08 100644 --- a/test/functional/placeholders_controller_test.rb +++ b/test/functional/placeholders_controller_test.rb @@ -2,7 +2,6 @@ require 'minitest/mock' class PlaceholdersControllerTest < ActionController::TestCase - fixtures :all include AuthenticatedTestHelper include SharingFormTestHelper diff --git a/test/functional/projects_controller_test.rb b/test/functional/projects_controller_test.rb index 0895631b49..7d6fd8cb97 100644 --- a/test/functional/projects_controller_test.rb +++ b/test/functional/projects_controller_test.rb @@ -9,7 +9,6 @@ class ProjectsControllerTest < ActionController::TestCase include SharingFormTestHelper include MockHelper - fixtures :all def setup login_as(FactoryBot.create(:admin)) diff --git a/test/functional/publications_controller_test.rb b/test/functional/publications_controller_test.rb index 894f4c6ae9..dd6df69304 100644 --- a/test/functional/publications_controller_test.rb +++ b/test/functional/publications_controller_test.rb @@ -3,8 +3,6 @@ class PublicationsControllerTest < ActionController::TestCase - fixtures :all - include AuthenticatedTestHelper include SharingFormTestHelper include RdfTestCases diff --git a/test/functional/publishing/batch_publishing_test.rb b/test/functional/publishing/batch_publishing_test.rb index 6fa1bc2203..859b10aa92 100644 --- a/test/functional/publishing/batch_publishing_test.rb +++ b/test/functional/publishing/batch_publishing_test.rb @@ -3,7 +3,6 @@ class BatchPublishingTest < ActionController::TestCase tests PeopleController - fixtures :all include AuthenticatedTestHelper diff --git a/test/functional/publishing/gatekeeper_publish_test.rb b/test/functional/publishing/gatekeeper_publish_test.rb index fa2e315fc0..b740d0aad0 100644 --- a/test/functional/publishing/gatekeeper_publish_test.rb +++ b/test/functional/publishing/gatekeeper_publish_test.rb @@ -3,7 +3,6 @@ class GatekeeperPublishTest < ActionController::TestCase tests PeopleController - fixtures :all include AuthenticatedTestHelper diff --git a/test/functional/publishing/single_publishing_test.rb b/test/functional/publishing/single_publishing_test.rb index de0ecf3a37..ec1772811b 100644 --- a/test/functional/publishing/single_publishing_test.rb +++ b/test/functional/publishing/single_publishing_test.rb @@ -3,7 +3,6 @@ class SinglePublishingTest < ActionController::TestCase tests DataFilesController - fixtures :all include AuthenticatedTestHelper diff --git a/test/functional/sessions_controller_test.rb b/test/functional/sessions_controller_test.rb index 4b82a1b688..dd79da7fa9 100644 --- a/test/functional/sessions_controller_test.rb +++ b/test/functional/sessions_controller_test.rb @@ -10,7 +10,6 @@ class SessionsControllerTest < ActionController::TestCase # Then, you can remove it from this and the units test. include AuthenticatedTestHelper - fixtures :users, :people test 'sessions#index redirects to session#new' do get :index diff --git a/test/functional/sharing/batch_sharing_change_test.rb b/test/functional/sharing/batch_sharing_change_test.rb index 43e6c5f1c2..60a5a42c34 100644 --- a/test/functional/sharing/batch_sharing_change_test.rb +++ b/test/functional/sharing/batch_sharing_change_test.rb @@ -3,7 +3,6 @@ class BatchSharingChangeTest < ActionController::TestCase tests PeopleController - fixtures :all include AuthenticatedTestHelper diff --git a/test/functional/site_announcements_controller_test.rb b/test/functional/site_announcements_controller_test.rb index c8a2fe14d9..ff959f422a 100644 --- a/test/functional/site_announcements_controller_test.rb +++ b/test/functional/site_announcements_controller_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class SiteAnnouncementsControllerTest < ActionController::TestCase - fixtures :users, :people, :roles include AuthenticatedTestHelper diff --git a/test/functional/sops_annotation_test.rb b/test/functional/sops_annotation_test.rb index 50e8b55c22..1d1ed017f8 100644 --- a/test/functional/sops_annotation_test.rb +++ b/test/functional/sops_annotation_test.rb @@ -5,7 +5,6 @@ class SopsAnnotationTest < ActionController::TestCase include SharingFormTestHelper include GeneralAuthorizationTestCases - fixtures :all tests SopsController diff --git a/test/functional/sops_controller_test.rb b/test/functional/sops_controller_test.rb index f5ba43bfda..a13fac4725 100644 --- a/test/functional/sops_controller_test.rb +++ b/test/functional/sops_controller_test.rb @@ -2,7 +2,6 @@ require 'minitest/mock' class SopsControllerTest < ActionController::TestCase - fixtures :all include AuthenticatedTestHelper include SharingFormTestHelper diff --git a/test/functional/strains_controller_test.rb b/test/functional/strains_controller_test.rb index 4063b3f7ef..286dcff59e 100644 --- a/test/functional/strains_controller_test.rb +++ b/test/functional/strains_controller_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class StrainsControllerTest < ActionController::TestCase - fixtures :all include AuthenticatedTestHelper include RdfTestCases diff --git a/test/functional/studies_controller_test.rb b/test/functional/studies_controller_test.rb index 0bd8b82f97..000b3cccee 100644 --- a/test/functional/studies_controller_test.rb +++ b/test/functional/studies_controller_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class StudiesControllerTest < ActionController::TestCase - fixtures :all include AuthenticatedTestHelper include SharingFormTestHelper diff --git a/test/functional/tags_controller_test.rb b/test/functional/tags_controller_test.rb index f4bb459b4d..0fbac4564c 100644 --- a/test/functional/tags_controller_test.rb +++ b/test/functional/tags_controller_test.rb @@ -3,7 +3,6 @@ class TagsControllerTest < ActionController::TestCase include AuthenticatedTestHelper - fixtures :all def setup login_as FactoryBot.create(:user, person: FactoryBot.create(:person)) diff --git a/test/functional/technology_types_controller_test.rb b/test/functional/technology_types_controller_test.rb index e63f01be69..b32ef6a4b4 100644 --- a/test/functional/technology_types_controller_test.rb +++ b/test/functional/technology_types_controller_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class TechnologyTypesControllerTest < ActionController::TestCase - fixtures :all include AuthenticatedTestHelper diff --git a/test/functional/users_controller_test.rb b/test/functional/users_controller_test.rb index e24d619a52..5efe720796 100644 --- a/test/functional/users_controller_test.rb +++ b/test/functional/users_controller_test.rb @@ -5,7 +5,6 @@ class UsersControllerTest < ActionController::TestCase # Then, you can remove it from this and the units test. include AuthenticatedTestHelper - fixtures :all def test_title get :new diff --git a/test/functional/uuids_controller_test.rb b/test/functional/uuids_controller_test.rb index e3dfc17ae2..5abf92947a 100644 --- a/test/functional/uuids_controller_test.rb +++ b/test/functional/uuids_controller_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class UuidsControllerTest < ActionController::TestCase - fixtures :all include AuthenticatedTestHelper def setup diff --git a/test/integration/ga4gh_trs_api_test.rb b/test/integration/ga4gh_trs_api_test.rb index aeee3587fc..328cf9b5ea 100644 --- a/test/integration/ga4gh_trs_api_test.rb +++ b/test/integration/ga4gh_trs_api_test.rb @@ -4,7 +4,6 @@ class Ga4ghTrsApiTest < ActionDispatch::IntegrationTest include AuthenticatedTestHelper - fixtures :users, :people test 'should not work if disabled' do with_config_value(:ga4gh_trs_api_enabled, false) do diff --git a/test/integration/isa_exporter_compliance_test.rb b/test/integration/isa_exporter_compliance_test.rb index 9f3297eb11..ba688387e3 100644 --- a/test/integration/isa_exporter_compliance_test.rb +++ b/test/integration/isa_exporter_compliance_test.rb @@ -3,7 +3,6 @@ require 'json-schema' class IsaExporterComplianceTest < ActionDispatch::IntegrationTest - fixtures :all include SharingFormTestHelper def self.store diff --git a/test/integration/nels_integration_test.rb b/test/integration/nels_integration_test.rb index c120437a83..8906a7996f 100644 --- a/test/integration/nels_integration_test.rb +++ b/test/integration/nels_integration_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class NelsIntegrationTest < ActionDispatch::IntegrationTest - fixtures :assay_classes include MockHelper include NelsTestHelper diff --git a/test/integration/omniauth_test.rb b/test/integration/omniauth_test.rb index abf1a6c726..5ba20091aa 100644 --- a/test/integration/omniauth_test.rb +++ b/test/integration/omniauth_test.rb @@ -4,7 +4,6 @@ class OmniauthTest < ActionDispatch::IntegrationTest include AuthenticatedTestHelper include HtmlHelper - fixtures :users, :people def setup OmniAuth.config.test_mode = true diff --git a/test/integration/registration_state_test.rb b/test/integration/registration_state_test.rb index 80aad24a71..cf7b42c1af 100644 --- a/test/integration/registration_state_test.rb +++ b/test/integration/registration_state_test.rb @@ -2,7 +2,6 @@ class RegistrationStateTest < ActionDispatch::IntegrationTest include AuthenticatedTestHelper - fixtures :all test 'partially registered user always redirects to select person' do User.current_user = FactoryBot.create(:user, login: 'partial', person: nil) diff --git a/test/test_helper.rb b/test/test_helper.rb index 5713db5256..a3a0d398e3 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -118,6 +118,7 @@ class ActiveSupport::TestCase include ActiveJob::TestHelper include ActionMailer::TestHelper + fixtures :all setup :clear_rails_cache, :create_initial_person teardown :clear_current_user @@ -185,7 +186,6 @@ def perform_jsonapi_checks # # Note: You'll currently still have to declare fixtures explicitly in integration tests # -- they do not yet inherit this setting - # fixtures :all set_fixture_class sop_versions: Sop::Version set_fixture_class model_versions: Model::Version diff --git a/test/unit/assay_class_test.rb b/test/unit/assay_class_test.rb index 3ef0593df8..2171c09e00 100644 --- a/test/unit/assay_class_test.rb +++ b/test/unit/assay_class_test.rb @@ -2,7 +2,6 @@ class AssayClassTest < ActiveSupport::TestCase # Replace this with your real tests. - fixtures :assay_classes test 'for_type' do assert_equal 'EXP', AssayClass.experimental.key assert_equal 'MODEL', AssayClass.modelling.key diff --git a/test/unit/assay_test.rb b/test/unit/assay_test.rb index 6adb8e37f6..f3775d3dd3 100644 --- a/test/unit/assay_test.rb +++ b/test/unit/assay_test.rb @@ -2,7 +2,6 @@ require 'tmpdir' class AssayTest < ActiveSupport::TestCase - fixtures :all test 'shouldnt edit the assay' do non_admin = FactoryBot.create :user diff --git a/test/unit/asset_test.rb b/test/unit/asset_test.rb index 13074906e3..c1f1c64351 100644 --- a/test/unit/asset_test.rb +++ b/test/unit/asset_test.rb @@ -2,7 +2,6 @@ class AssetTest < ActiveSupport::TestCase - fixtures :all include ApplicationHelper test 'can create' do diff --git a/test/unit/bio_schema/data_dump_test.rb b/test/unit/bio_schema/data_dump_test.rb index e19a2f677b..a42f9cf16d 100644 --- a/test/unit/bio_schema/data_dump_test.rb +++ b/test/unit/bio_schema/data_dump_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class DataDumpTest < ActiveSupport::TestCase - fixtures :all test 'can write dump and access via file object' do dump = create_workflow_dump diff --git a/test/unit/collection_test.rb b/test/unit/collection_test.rb index 2b07b42ac1..bdb92d84d9 100644 --- a/test/unit/collection_test.rb +++ b/test/unit/collection_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class CollectionTest < ActiveSupport::TestCase - fixtures :all test 'project' do person = FactoryBot.create(:person) diff --git a/test/unit/content_blob_test.rb b/test/unit/content_blob_test.rb index 111a1cafd7..64d3aa9793 100644 --- a/test/unit/content_blob_test.rb +++ b/test/unit/content_blob_test.rb @@ -8,7 +8,6 @@ class ContentBlobTest < ActiveSupport::TestCase include NelsTestHelper - fixtures :content_blobs test 'search terms' do blob = ContentBlob.new diff --git a/test/unit/data_file_test.rb b/test/unit/data_file_test.rb index 83b008a63a..fccb986c5e 100644 --- a/test/unit/data_file_test.rb +++ b/test/unit/data_file_test.rb @@ -2,7 +2,6 @@ require 'openbis_test_helper' class DataFileTest < ActiveSupport::TestCase - fixtures :all test 'associations' do datafile_owner = FactoryBot.create :user diff --git a/test/unit/datacite_metadata_test.rb b/test/unit/datacite_metadata_test.rb index 676d93c6c2..09f770c777 100644 --- a/test/unit/datacite_metadata_test.rb +++ b/test/unit/datacite_metadata_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class DataciteMetadataTest < ActiveSupport::TestCase - fixtures :investigations setup do contributor = FactoryBot.create(:person) diff --git a/test/unit/document_test.rb b/test/unit/document_test.rb index 0405bd35c5..419e4cc162 100644 --- a/test/unit/document_test.rb +++ b/test/unit/document_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class DocumentTest < ActiveSupport::TestCase - fixtures :all test 'project' do person = FactoryBot.create(:person) diff --git a/test/unit/event_test.rb b/test/unit/event_test.rb index ebc35a94bc..05fd414031 100644 --- a/test/unit/event_test.rb +++ b/test/unit/event_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class EventTest < ActiveSupport::TestCase - fixtures :all def setup @event = events(:event_with_no_files) diff --git a/test/unit/favourite_test.rb b/test/unit/favourite_test.rb index b827d319f5..b1674a03cf 100644 --- a/test/unit/favourite_test.rb +++ b/test/unit/favourite_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class FavouriteTest < ActiveSupport::TestCase - fixtures :all test 'remove redundant' do fav = favourites(:data_file_fav) diff --git a/test/unit/file_template_test.rb b/test/unit/file_template_test.rb index 3179d6ba3e..79537cf743 100644 --- a/test/unit/file_template_test.rb +++ b/test/unit/file_template_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class FileTemplateTest < ActiveSupport::TestCase - fixtures :all test 'project' do person = FactoryBot.create(:person) diff --git a/test/unit/help_document_test.rb b/test/unit/help_document_test.rb index a16db8352b..fc4ece26eb 100644 --- a/test/unit/help_document_test.rb +++ b/test/unit/help_document_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class HelpDocumentTest < ActiveSupport::TestCase - fixtures :all test 'redcloth markup working' do doc = help_documents(:example) diff --git a/test/unit/human_disease_test.rb b/test/unit/human_disease_test.rb index 1cc3de6365..314d56b60e 100644 --- a/test/unit/human_disease_test.rb +++ b/test/unit/human_disease_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class HumanDiseaseTest < ActiveSupport::TestCase - fixtures :all test 'validate concept uri' do hd = FactoryBot.build(:human_disease, bioportal_concept: FactoryBot.build(:bioportal_concept, concept_uri: 'blablabla')) diff --git a/test/unit/institution_test.rb b/test/unit/institution_test.rb index 786b247118..718889bd4c 100644 --- a/test/unit/institution_test.rb +++ b/test/unit/institution_test.rb @@ -4,8 +4,6 @@ class InstitutionTest < ActiveSupport::TestCase include MockHelper - fixtures :institutions, :projects, :work_groups, :users, :group_memberships, :people - def setup ror_mock end diff --git a/test/unit/investigation_test.rb b/test/unit/investigation_test.rb index 6943cf8d6d..e6794df126 100644 --- a/test/unit/investigation_test.rb +++ b/test/unit/investigation_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class InvestigationTest < ActiveSupport::TestCase - fixtures :investigations, :projects, :studies, :assays, :assay_assets, :permissions, :policies test 'associations' do inv = investigations(:metabolomics_investigation) diff --git a/test/unit/jobs/auth_lookup_job_test.rb b/test/unit/jobs/auth_lookup_job_test.rb index da8f64b9e5..b4cd0539a4 100644 --- a/test/unit/jobs/auth_lookup_job_test.rb +++ b/test/unit/jobs/auth_lookup_job_test.rb @@ -97,10 +97,10 @@ def teardown Sop.clear_lookup_table assert_nil sop.lookup_for('view', user.id) - assert_nil sop.lookup_for('download', user.id) - assert_nil sop.lookup_for('edit', user.id) - assert_nil sop.lookup_for('manage', user.id) - assert_nil sop.lookup_for('delete', user.id) + assert_nil sop.lookup_for('download', user.id) + assert_nil sop.lookup_for('edit', user.id) + assert_nil sop.lookup_for('manage', user.id) + assert_nil sop.lookup_for('delete', user.id) UserAuthLookupUpdateJob.new.perform(user, 'Sop') diff --git a/test/unit/jobs/remove_subscriptions_for_item_job_test.rb b/test/unit/jobs/remove_subscriptions_for_item_job_test.rb index 973d95cb4d..850cca5be5 100644 --- a/test/unit/jobs/remove_subscriptions_for_item_job_test.rb +++ b/test/unit/jobs/remove_subscriptions_for_item_job_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class RemoveSubscriptionsForItemJobTest < ActiveSupport::TestCase - fixtures :all def setup User.current_user = FactoryBot.create(:user) diff --git a/test/unit/jobs/set_subscriptions_for_item_job_test.rb b/test/unit/jobs/set_subscriptions_for_item_job_test.rb index 65a2bee7e9..afc7b540a4 100644 --- a/test/unit/jobs/set_subscriptions_for_item_job_test.rb +++ b/test/unit/jobs/set_subscriptions_for_item_job_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class SetSubscriptionsForItemJobTest < ActiveSupport::TestCase - fixtures :all def setup User.current_user = FactoryBot.create(:user) diff --git a/test/unit/mailer_test.rb b/test/unit/mailer_test.rb index 8ff93f2901..73910caf55 100644 --- a/test/unit/mailer_test.rb +++ b/test/unit/mailer_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class MailerTest < ActionMailer::TestCase - fixtures :all def setup disable_authorization_checks { Person.where('first_name = ?', 'default admin').destroy_all } diff --git a/test/unit/model_format_test.rb b/test/unit/model_format_test.rb index 5c6dc1588d..8ec945f81e 100644 --- a/test/unit/model_format_test.rb +++ b/test/unit/model_format_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class ModelFormatTest < ActiveSupport::TestCase - fixtures :model_formats test 'validation' do existing = model_formats(:SBML) diff --git a/test/unit/model_test.rb b/test/unit/model_test.rb index 834caf798f..4b32780ee6 100644 --- a/test/unit/model_test.rb +++ b/test/unit/model_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class ModelTest < ActiveSupport::TestCase - fixtures :all test 'assocations' do model = models(:teusink) diff --git a/test/unit/model_type_test.rb b/test/unit/model_type_test.rb index 2ca4fde0c1..2ccd965193 100644 --- a/test/unit/model_type_test.rb +++ b/test/unit/model_type_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class ModelTypeTest < ActiveSupport::TestCase - fixtures :model_types test 'validation' do existing = model_types(:ODE) diff --git a/test/unit/notifiee_info_test.rb b/test/unit/notifiee_info_test.rb index 3a965df5ae..e508878f72 100644 --- a/test/unit/notifiee_info_test.rb +++ b/test/unit/notifiee_info_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class NotifieeInfoTest < ActiveSupport::TestCase - fixtures :site_announcements def test_unique_key_generation # the SiteAnnouncementCategory is used as a dummy notifiee diff --git a/test/unit/organism_test.rb b/test/unit/organism_test.rb index 8d5614bfcb..f9c11f5fe7 100644 --- a/test/unit/organism_test.rb +++ b/test/unit/organism_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class OrganismTest < ActiveSupport::TestCase - fixtures :all test 'assay association' do o = organisms(:Saccharomyces_cerevisiae) diff --git a/test/unit/permission_test.rb b/test/unit/permission_test.rb index 303090034f..7e17a3b00c 100644 --- a/test/unit/permission_test.rb +++ b/test/unit/permission_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class PermissionTest < ActiveSupport::TestCase - fixtures :all setup do @programme = FactoryBot.create(:programme) diff --git a/test/unit/permissions/auth_lookup_table_test.rb b/test/unit/permissions/auth_lookup_table_test.rb index fc9e8e9098..adcffd4063 100644 --- a/test/unit/permissions/auth_lookup_table_test.rb +++ b/test/unit/permissions/auth_lookup_table_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class AuthLookupTableTest < ActiveSupport::TestCase - fixtures :roles def setup @val = Seek::Config.auth_lookup_enabled diff --git a/test/unit/permissions/authorization_test.rb b/test/unit/permissions/authorization_test.rb index 81829708d6..5e95e6231c 100644 --- a/test/unit/permissions/authorization_test.rb +++ b/test/unit/permissions/authorization_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class AuthorizationTest < ActiveSupport::TestCase - fixtures :all # ************************************************************************ # this section tests individual helper methods within Authorization module diff --git a/test/unit/permissions/policy_based_auth_test.rb b/test/unit/permissions/policy_based_auth_test.rb index 84b09ec262..311e7126db 100644 --- a/test/unit/permissions/policy_based_auth_test.rb +++ b/test/unit/permissions/policy_based_auth_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class PolicyBasedAuthTest < ActiveSupport::TestCase - fixtures :all test 'has advanced permissions' do user = FactoryBot.create(:user) diff --git a/test/unit/person_test.rb b/test/unit/person_test.rb index f9663c32b6..9eb1139929 100644 --- a/test/unit/person_test.rb +++ b/test/unit/person_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class PersonTest < ActiveSupport::TestCase - fixtures :users, :people, :roles def test_work_groups p = FactoryBot.create(:person_in_multiple_projects) diff --git a/test/unit/policy_test.rb b/test/unit/policy_test.rb index 6db205c927..b850a65959 100644 --- a/test/unit/policy_test.rb +++ b/test/unit/policy_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class PolicyTest < ActiveSupport::TestCase - fixtures :all test 'deep clone' do policy = policies(:download_for_all_sysmo_users_policy) diff --git a/test/unit/project_test.rb b/test/unit/project_test.rb index cc545a12e1..6eb3135ce4 100644 --- a/test/unit/project_test.rb +++ b/test/unit/project_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class ProjectTest < ActiveSupport::TestCase - fixtures :projects, :institutions, :work_groups, :group_memberships, :people, :users, :assets, :organisms test 'workgroups destroyed with project' do diff --git a/test/unit/publication_test.rb b/test/unit/publication_test.rb index 3571fe0bec..0f3f28a4d1 100644 --- a/test/unit/publication_test.rb +++ b/test/unit/publication_test.rb @@ -4,7 +4,6 @@ class PublicationTest < ActiveSupport::TestCase include MockHelper - fixtures :all test 'title validation allows long titles' do long_title = ('a' * 65536).freeze diff --git a/test/unit/recommended_model_environment_test.rb b/test/unit/recommended_model_environment_test.rb index 2f83e22756..5f2217fec9 100644 --- a/test/unit/recommended_model_environment_test.rb +++ b/test/unit/recommended_model_environment_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class RecommendedModelEnvironmentTest < ActiveSupport::TestCase - fixtures :recommended_model_environments test 'validation' do existing = recommended_model_environments(:jws) diff --git a/test/unit/site_announcements_test.rb b/test/unit/site_announcements_test.rb index 9678fba76f..e9ea529539 100644 --- a/test/unit/site_announcements_test.rb +++ b/test/unit/site_announcements_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class SiteAnnouncementsTest < ActiveSupport::TestCase - fixtures :site_announcements test 'using fixtures' do assert_not_nil SiteAnnouncement.first diff --git a/test/unit/snapshot_test.rb b/test/unit/snapshot_test.rb index e19e135fc8..5f44784b34 100644 --- a/test/unit/snapshot_test.rb +++ b/test/unit/snapshot_test.rb @@ -4,7 +4,6 @@ class SnapshotTest < ActiveSupport::TestCase include MockHelper - fixtures :investigations setup do contributor = FactoryBot.create(:person) diff --git a/test/unit/sop_test.rb b/test/unit/sop_test.rb index fd9ca9c617..a1d606d178 100644 --- a/test/unit/sop_test.rb +++ b/test/unit/sop_test.rb @@ -2,7 +2,6 @@ class SopTest < ActiveSupport::TestCase - fixtures :all def setup @person = FactoryBot.create(:person) diff --git a/test/unit/strain_test.rb b/test/unit/strain_test.rb index 0f61454f10..84144bd8ad 100644 --- a/test/unit/strain_test.rb +++ b/test/unit/strain_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class StrainTest < ActiveSupport::TestCase - fixtures :all def setup User.current_user = FactoryBot.create(:user) end diff --git a/test/unit/study_test.rb b/test/unit/study_test.rb index 6ab079306e..c8da96684b 100644 --- a/test/unit/study_test.rb +++ b/test/unit/study_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class StudyTest < ActiveSupport::TestCase - fixtures :all test 'associations' do study = studies(:metabolomics_study) diff --git a/test/unit/subscription_test.rb b/test/unit/subscription_test.rb index e3226b49b3..578b9a5a21 100644 --- a/test/unit/subscription_test.rb +++ b/test/unit/subscription_test.rb @@ -1,7 +1,6 @@ require 'test_helper' # Authorization tests that are specific to public access class SubscriptionTest < ActiveSupport::TestCase - fixtures :all def setup User.current_user = FactoryBot.create(:user) diff --git a/test/unit/treeview_builder_test.rb b/test/unit/treeview_builder_test.rb index 19b602461c..c11091ca7f 100644 --- a/test/unit/treeview_builder_test.rb +++ b/test/unit/treeview_builder_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class TreeviewBuilderTest < ActionController::TestCase - fixtures :all include ActionView::Helpers::SanitizeHelper test 'create node' do diff --git a/test/unit/user_test.rb b/test/unit/user_test.rb index a33dc5e515..7a7ce5ae77 100644 --- a/test/unit/user_test.rb +++ b/test/unit/user_test.rb @@ -5,7 +5,6 @@ class UserTest < ActiveSupport::TestCase # Then, you can remove it from this and the functional test. include AuthenticatedTestHelper - fixtures :users, :sops, :data_files, :models, :assets test 'validates email if set' do u = FactoryBot.create :user diff --git a/test/unit/worksheet_test.rb b/test/unit/worksheet_test.rb index 3586067bcd..3a4ea48a91 100644 --- a/test/unit/worksheet_test.rb +++ b/test/unit/worksheet_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class WorksheetTest < ActiveSupport::TestCase - fixtures :all test 'create worksheet' do ws = Worksheet.new(content_blob: content_blobs(:unique_spreadsheet_blob), last_row: 20, last_column: 20) From f4eddf7bfa71fb28ea6aa86f4c47651dc4b8f397 Mon Sep 17 00:00:00 2001 From: Finn Bacall Date: Thu, 4 Dec 2025 11:25:51 +0000 Subject: [PATCH 2/2] Remove some more redundant `fixtures` calls --- test/functional/extended_metadata_types_controller_test.rb | 1 - test/functional/templates_controller_test.rb | 1 - test/unit/extended_metadatas/emt_extractor_test.rb | 2 -- 3 files changed, 4 deletions(-) diff --git a/test/functional/extended_metadata_types_controller_test.rb b/test/functional/extended_metadata_types_controller_test.rb index 19415b5a36..50cc7b98eb 100644 --- a/test/functional/extended_metadata_types_controller_test.rb +++ b/test/functional/extended_metadata_types_controller_test.rb @@ -3,7 +3,6 @@ class ExtendedMetadataTypesControllerTest < ActionController::TestCase include AuthenticatedTestHelper - fixtures :sample_attribute_types test 'get form fields' do cmt = FactoryBot.create(:simple_investigation_extended_metadata_type) diff --git a/test/functional/templates_controller_test.rb b/test/functional/templates_controller_test.rb index c02dd65237..19fabf8660 100644 --- a/test/functional/templates_controller_test.rb +++ b/test/functional/templates_controller_test.rb @@ -1,7 +1,6 @@ require 'test_helper' class TemplatesControllerTest < ActionController::TestCase - fixtures :isa_tags include AuthenticatedTestHelper include SharingFormTestHelper diff --git a/test/unit/extended_metadatas/emt_extractor_test.rb b/test/unit/extended_metadatas/emt_extractor_test.rb index 791b4867e6..601f16f320 100644 --- a/test/unit/extended_metadatas/emt_extractor_test.rb +++ b/test/unit/extended_metadatas/emt_extractor_test.rb @@ -2,8 +2,6 @@ class EmtExtractorTest < ActiveSupport::TestCase - fixtures :sample_attribute_types - test 'creates extended metadata type with simple attributes from valid json file' do emt_file = fixture_file_upload('extended_metadata_type/valid_simple_emt.json', 'application/json')