Skip to content

Commit

Permalink
Add missing attributes/fields from unit tests for Sample Metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
sdjmchattie committed Jul 24, 2024
1 parent 0fdc51e commit b0cd83b
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions spec/resources/api/v2/sample_metadata_resource_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit b0cd83b

Please sign in to comment.