From b0cd83b4ffd969fde1ce183980223a4881f11db0 Mon Sep 17 00:00:00 2001 From: Stuart McHattie Date: Wed, 24 Jul 2024 15:13:12 +0100 Subject: [PATCH] Add missing attributes/fields from unit tests for Sample Metadata --- .../api/v2/sample_metadata_resource_spec.rb | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/spec/resources/api/v2/sample_metadata_resource_spec.rb b/spec/resources/api/v2/sample_metadata_resource_spec.rb index 73431baef2..aa113a2bf6 100644 --- a/spec/resources/api/v2/sample_metadata_resource_spec.rb +++ b/spec/resources/api/v2/sample_metadata_resource_spec.rb @@ -10,21 +10,27 @@ # Test attributes it 'has the expected attributes', :aggregate_failures do - expect(resource).to have_attribute :sample_common_name - expect(resource).to have_attribute :supplier_name + expect(resource).to have_attribute :cohort expect(resource).to have_attribute :collected_by - expect(resource).to have_attribute :donor_id expect(resource).to have_attribute :concentration + expect(resource).to have_attribute :donor_id + expect(resource).to have_attribute :gender + expect(resource).to have_attribute :sample_common_name + expect(resource).to have_attribute :sample_description + expect(resource).to have_attribute :supplier_name expect(resource).to have_attribute :volume end # Updatable fields it 'allows updating of read-write fields', :aggregate_failures do - expect(resource).to have_updatable_field :sample_common_name - expect(resource).to have_updatable_field :supplier_name + expect(resource).to have_updatable_field :cohort expect(resource).to have_updatable_field :collected_by - expect(resource).to have_updatable_field :donor_id expect(resource).to have_updatable_field :concentration + expect(resource).to have_updatable_field :donor_id + expect(resource).to have_updatable_field :gender + expect(resource).to have_updatable_field :sample_common_name + expect(resource).to have_updatable_field :sample_description + expect(resource).to have_updatable_field :supplier_name expect(resource).to have_updatable_field :volume end