Skip to content

Commit

Permalink
Merge pull request #595 from ministryofjustice/asylum-support-base-path
Browse files Browse the repository at this point in the history
Correct slug for asylum support tribunal documents
  • Loading branch information
tommyp committed Nov 4, 2015
2 parents 82d66aa + 7d2cb71 commit 84bca17
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/lib/specialist_publisher_wiring.rb
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@
}

define_singleton(:asylum_support_decision_finder_schema) {
FinderSchema.new(Rails.root.join("finders/schemas/asylum-support-decisions.json"))
FinderSchema.new(Rails.root.join("finders/schemas/asylum-support-tribunal-decisions.json"))
}

define_singleton(:utaac_decision_finder_schema) {
Expand Down
2 changes: 1 addition & 1 deletion app/models/document_factory_registry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def asylum_support_decision_factory
AsylumSupportDecisionValidator.new(
AsylumSupportDecision.new(
SpecialistDocument.new(
SlugGenerator.new(prefix: "asylum-support-decisions"),
SlugGenerator.new(prefix: "asylum-support-tribunal-decisions"),
*args,
),
)
Expand Down
10 changes: 5 additions & 5 deletions features/step_definitions/asylum_support_decision_steps.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
When(/^I create a asylum support decision$/) do
@document_title = "Example asylum support decision"
@slug = "asylum-support-decisions/example-asylum-support-decision"
@slug = "asylum-support-tribunal-decisions/example-asylum-support-decision"
@document_fields = asylum_support_decision_fields(title: @document_title)

create_asylum_support_decision(@document_fields)
Expand Down Expand Up @@ -44,7 +44,7 @@

Given(/^a draft asylum support decision exists$/) do
@document_title = "Example asylum support decision"
@slug = "asylum-support-decisions/example-asylum-support-decision"
@slug = "asylum-support-tribunal-decisions/example-asylum-support-decision"
@document_fields = asylum_support_decision_fields(title: @document_title)
@rummager_fields = asylum_support_decision_rummager_fields(title: @document_title)

Expand Down Expand Up @@ -72,7 +72,7 @@
@document_title = "Example asylum support decision"
@attachment_title = "My attachment"

@slug = "asylum-support-decisions/example-asylum-support-decision"
@slug = "asylum-support-tribunal-decisions/example-asylum-support-decision"
@document_fields = asylum_support_decision_fields(title: @document_title)

create_asylum_support_decision(@document_fields, publish: true)
Expand All @@ -81,7 +81,7 @@

Given(/^a published asylum support decision exists$/) do
@document_title = "Example asylum support decision"
@slug = "asylum-support-decisions/example-asylum-support-decision"
@slug = "asylum-support-tribunal-decisions/example-asylum-support-decision"
@document_fields = asylum_support_decision_fields(title: @document_title)

create_asylum_support_decision(@document_fields, publish: true)
Expand Down Expand Up @@ -114,7 +114,7 @@

When(/^I publish a new asylum support decision$/) do
@document_title = "Example asylum support decision"
@slug = "asylum-support-decisions/example-asylum-support-decision"
@slug = "asylum-support-tribunal-decisions/example-asylum-support-decision"
@document_fields = asylum_support_decision_fields(title: @document_title)
@rummager_fields = asylum_support_decision_rummager_fields(title: @document_title)

Expand Down
2 changes: 1 addition & 1 deletion features/support/document_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def check_added_to_rummager(slug, fields)
document_type_slug_prefix_map = {
"cma-cases" => "cma_case",
"aaib-reports" => "aaib_report",
"asylum-support-decisions" => "asylum_support_decision",
"asylum-support-tribunal-decisions" => "asylum_support_decision",
"international-development-funding" => "international_development_fund",
"drug-safety-update" => "drug_safety_update",
"drug-device-alerts" => "medical_safety_alert",
Expand Down

0 comments on commit 84bca17

Please sign in to comment.