Skip to content

Commit

Permalink
Merge pull request #9598 from DFE-Digital/dy-vendor-api-v1.5-is-not-a…
Browse files Browse the repository at this point in the history
…vailable-in-sandbox

Enable v1.5 in Sandbox
  • Loading branch information
dcyoung-dev authored Jul 29, 2024
2 parents 3cb1a09 + c9e320c commit 6ca18cd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def spec_draft
end

def spec_current
spec(version: VendorAPI::VERSION)
spec(version: AllowedCrossNamespaceUsage::VendorAPIInfo.released_version)
end

def spec_1_0
Expand All @@ -33,6 +33,10 @@ def spec_1_4
spec(version: VendorAPI::VERSION_1_4)
end

def spec_1_5
spec(version: VendorAPI::VERSION_1_5)
end

private

def spec(**)
Expand Down
4 changes: 2 additions & 2 deletions app/lib/vendor_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module VendorAPI
VERSION_1_3 = '1.3'.freeze
VERSION_1_4 = '1.4'.freeze
VERSION_1_5 = '1.5pre'.freeze
VERSION = VERSION_1_4
VERSION = '1.5'.freeze

VERSIONS = {
'1.0' => [
Expand Down Expand Up @@ -61,7 +61,7 @@ module VendorAPI
'1.4' => [
Changes::V14::AddGcseCompletingQualificationData,
],
'1.5pre' => [
'1.5' => [
Changes::V15::AddApplicationSentToProviderDatetime,
Changes::V15::AddReferenceFeedbackProvidedAtDatetime,
],
Expand Down
4 changes: 2 additions & 2 deletions spec/system/api_docs/api_docs_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'rails_helper'

RSpec.feature 'API docs' do
RSpec.describe 'API docs' do
scenario 'User browses through the API docs' do
given_i_am_a_vendor
i_can_browse_the_api_docs
Expand Down Expand Up @@ -42,6 +42,6 @@ def when_i_enter_an_incorrect_api_version_in_the_url
end

def then_i_get_redirected_to_the_latest_production_version
expect(page).to have_current_path api_docs_versioned_reference_path(api_version: "v#{VendorAPI::VERSION}"), ignore_query: true
expect(page).to have_current_path api_docs_versioned_reference_path(api_version: "v#{AllowedCrossNamespaceUsage::VendorAPIInfo.released_version}"), ignore_query: true
end
end

0 comments on commit 6ca18cd

Please sign in to comment.