Skip to content

Commit

Permalink
fixup doc type spec
Browse files Browse the repository at this point in the history
  • Loading branch information
GDSNewt committed Feb 28, 2025
1 parent 46fee11 commit e4962c3
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 7 deletions.
28 changes: 25 additions & 3 deletions spec/fixtures/factories.rb
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,7 @@
"digital_market_research_publisher" => %w[gambling-commission],
"digital_market_research_area" => %w[media-and-entertainment],
"digital_market_research_topic" => %w[future-connectivity],
"digital_market_research_publish_date" => "2021-02-18T10:12:26+00:00",
"digital_market_research_publish_date" => "2021-02-18",
}
end
end
Expand All @@ -777,8 +777,8 @@
"zone_restriction" => "no-longer-in-force",
"zone_type" => %w[surveillance],
"virus_strain" => "h5nx",
"disease_case_opened_date" => "2022-08-18T10:12:26+00:00",
"disease_case_closed_date" => "2022-09-18T10:12:26+00:00",
"disease_case_opened_date" => "2022-08-18",
"disease_case_closed_date" => "2022-09-18",
}
end
end
Expand Down Expand Up @@ -846,10 +846,32 @@
factory :export_health_certificate, parent: :document do
base_path { "/export-health-certificates/example-document" }
document_type { "export_health_certificate" }

transient do
default_metadata do
{
"destination_country" => ["afghanistan"],

Check failure on line 853 in spec/fixtures/factories.rb

View workflow job for this annotation

GitHub Actions / Lint Ruby / Run RuboCop

Style/WordArray: Use `%w` or `%W` for an array of words. (https://rubystyle.guide#percent-w)
"commodity_type" => "animal-products-including-food",
"certificate_status" => "active"

Check failure on line 855 in spec/fixtures/factories.rb

View workflow job for this annotation

GitHub Actions / Lint Ruby / Run RuboCop

Style/TrailingCommaInHashLiteral: Put a comma after the last item of a multiline hash.
}
end
end
end

factory :traffic_commissioner_regulatory_decision, parent: :document do
base_path { "/traffic_commissioner_regulatory_decisions/example-document" }
document_type { "traffic_commissioner_regulatory_decision" }

transient do
default_metadata do
{
"decision_subject" => ["driver-conduct"],

Check failure on line 868 in spec/fixtures/factories.rb

View workflow job for this annotation

GitHub Actions / Lint Ruby / Run RuboCop

Style/WordArray: Use `%w` or `%W` for an array of words. (https://rubystyle.guide#percent-w)
"regions" => ["eastern"],

Check failure on line 869 in spec/fixtures/factories.rb

View workflow job for this annotation

GitHub Actions / Lint Ruby / Run RuboCop

Style/WordArray: Use `%w` or `%W` for an array of words. (https://rubystyle.guide#percent-w)
"case_type" => ["application"],

Check failure on line 870 in spec/fixtures/factories.rb

View workflow job for this annotation

GitHub Actions / Lint Ruby / Run RuboCop

Style/WordArray: Use `%w` or `%W` for an array of words. (https://rubystyle.guide#percent-w)
"outcome_type" => ["application-granted-as-applied-for"],

Check failure on line 871 in spec/fixtures/factories.rb

View workflow job for this annotation

GitHub Actions / Lint Ruby / Run RuboCop

Style/WordArray: Use `%w` or `%W` for an array of words. (https://rubystyle.guide#percent-w)
"first_published_at" => "2022-08-18"

Check failure on line 872 in spec/fixtures/factories.rb

View workflow job for this annotation

GitHub Actions / Lint Ruby / Run RuboCop

Style/TrailingCommaInHashLiteral: Put a comma after the last item of a multiline hash.
}
end
end
end
end
4 changes: 0 additions & 4 deletions spec/models/document_type_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@

EXCEPTIONS_TO_GENERAL_TESTING = %w[
ai_assurance_portfolio_technique
animal_disease_case
drcf_digital_markets_research
export_health_certificate
traffic_commissioner_regulatory_decision
].freeze

Dir["lib/documents/schemas/*.json"].each do |file|
Expand Down

0 comments on commit e4962c3

Please sign in to comment.