Skip to content

Commit 253cf59

Browse files
committed
Fix bugs uncovered by v2 API test coverage
These changes resolve the following issues uncovered via the API v2 tests: - app/views/api/v2/datasets/_show.json.jbuilder - Failure rendering output.doi_url when output is present (undefined method `doi_url`) - config/routes.rb - Spec failures due to undefined route helpers in test context (e.g., `api_v2_templates_path`)
1 parent 021c87c commit 253cf59

2 files changed

Lines changed: 1 addition & 1 deletion

File tree

app/views/api/v2/datasets/_show.json.jbuilder

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ if output.is_a?(ResearchOutput)
77

88
json.type output.output_type
99
json.title output.title
10-
json.doi_url output.doi_url
1110
json.description output.description
1211
json.personal_data Api::V2::ApiPresenter.boolean_to_yes_no_unknown(value: output.personal_data)
1312
json.sensitive_data Api::V2::ApiPresenter.boolean_to_yes_no_unknown(value: output.sensitive_data)

config/routes.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@
210210
get :me, controller: :base_api
211211

212212
resources :plans, only: %i[index show]
213+
resources :templates, only: :index
213214
end
214215
end
215216

0 commit comments

Comments
 (0)