-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9cfd86f
commit 9a52f25
Showing
7 changed files
with
242 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'rails_helper' | ||
|
||
RSpec.describe 'V1::GI::LCPE::Exams', type: :request do | ||
include SchemaMatchers | ||
|
||
describe 'GET v1/gi/lcpe/exams' do | ||
context 'Retrieves exam data for GI Bill Comparison Tool' do | ||
it 'returns 200 response' do | ||
VCR.use_cassette('gi/lcpe/get_exams_v1') do | ||
get v1_gi_lcpe_exams_url, params: nil | ||
expect(response).to have_http_status(:ok) | ||
expect(response).to match_response_schema('gi/lcpe/exams') | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'rails_helper' | ||
|
||
RSpec.describe 'V1::GI::LCPE::Lacs', type: :request do | ||
include SchemaMatchers | ||
|
||
describe 'GET v1/gi/lcpe/lacs' do | ||
context 'Retrieves licenses and certifications data for GI Bill Comparison Tool' do | ||
it 'returns 200 response' do | ||
VCR.use_cassette('gi/lcpe/get_licenses_and_certs_v1') do | ||
get v1_gi_lcpe_lacs_url, params: nil | ||
expect(response).to have_http_status(:ok) | ||
expect(response).to match_response_schema('gi/lcpe/lacs') | ||
end | ||
end | ||
end | ||
end | ||
|
||
describe 'GET v1/gi/lcpe/lacs/:id' do | ||
context 'Retrieves license and certification details for GI Bill Comparison Tool' do | ||
it 'returns 200 response' do | ||
VCR.use_cassette('gi/lcpe/get_license_and_cert_details_v1') do | ||
get v1_gi_lcpe_lacs_url + '/1@f9822' | ||
expect(response).to have_http_status(:ok) | ||
expect(response).to match_response_schema('gi/lcpe/lac') | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"type": "object", | ||
"properties": { | ||
"exams": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"enriched_id": { | ||
"type": "string" | ||
}, | ||
"name": { | ||
"type": "string" | ||
}, | ||
"tests": { | ||
"type": [ | ||
"array", | ||
"null" | ||
], | ||
"items": { | ||
"type": "object", | ||
"properties" : { | ||
"name": { | ||
"type": "string" | ||
}, | ||
"fee": { | ||
"type": ["string", "null"] | ||
}, | ||
"begin_date": { | ||
"type": ["string", "null"] | ||
}, | ||
"end_date": { | ||
"type": ["string", "null"] | ||
} | ||
} | ||
} | ||
}, | ||
"institution": { | ||
"oneOf": [ | ||
{ | ||
"type": "null" | ||
}, | ||
{ | ||
"$ref": "institution.json" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"name": { | ||
"type": "string" | ||
}, | ||
"physical_address": { | ||
"type": "object", | ||
"properties": { | ||
"address_1": { | ||
"type": ["string", "null"] | ||
}, | ||
"address_2": { | ||
"type": ["string", "null"] | ||
}, | ||
"address_3": { | ||
"type": ["string", "null"] | ||
}, | ||
"city": { | ||
"type": ["string", "null"] | ||
}, | ||
"state": { | ||
"type": ["string", "null"] | ||
}, | ||
"zip": { | ||
"type": ["string", "null"] | ||
}, | ||
"country": { | ||
"type": ["string", "null"] | ||
} | ||
} | ||
}, | ||
"mailing_address": { | ||
"type": "object", | ||
"properties": { | ||
"address_1": { | ||
"type": ["string", "null"] | ||
}, | ||
"address_2": { | ||
"type": ["string", "null"] | ||
}, | ||
"address_3": { | ||
"type": ["string", "null"] | ||
}, | ||
"city": { | ||
"type": ["string", "null"] | ||
}, | ||
"state": { | ||
"type": ["string", "null"] | ||
}, | ||
"zip": { | ||
"type": ["string", "null"] | ||
}, | ||
"country": { | ||
"type": ["string", "null"] | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"type": "object", | ||
"properties": { | ||
"lac": { | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"enriched_id": { | ||
"type": "string" | ||
}, | ||
"name": { | ||
"type": "string" | ||
}, | ||
"type": { | ||
"type": "string" | ||
}, | ||
"tests": { | ||
"type": [ | ||
"array", | ||
"null" | ||
], | ||
"items": { | ||
"type": "object", | ||
"properties" : { | ||
"name": { | ||
"type": "string" | ||
}, | ||
"fee": { | ||
"type": ["string", "null"] | ||
} | ||
} | ||
} | ||
}, | ||
"institution": { | ||
"oneOf": [ | ||
{ | ||
"type": "null" | ||
}, | ||
{ | ||
"$ref": "institution.json" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"type": "object", | ||
"properties": { | ||
"lacs": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"enriched_id": { | ||
"type": "string" | ||
}, | ||
"name": { | ||
"type": "string" | ||
}, | ||
"type": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
2 changes: 1 addition & 1 deletion
2
spec/support/vcr_cassettes/gi/lcpe/get_licenses_and_certs_v1.yml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.