Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ECRO-2785: Add new RLC fields #80

Merged
merged 3 commits into from
Jan 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@477b21f02be01bcb8030d50f37cfec92bfa615b6
uses: ruby/setup-ruby@03b78bdda287ae04217ee12e4b64996630a03542
with:
ruby-version: ${{ matrix.ruby-version }}
- name: Install dependencies
run: bundle install
- name: Run tests
run: bundle exec rake
run: bundle exec rake
3 changes: 3 additions & 0 deletions lib/checkr/county_criminal_search.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ module Checkr
class CountyCriminalSearch < APIResource

attribute :status
attribute :result
attribute :cancellation_reason
attribute :cancellation_reason_description
attribute :completed_at
attribute :turnaround_time
attribute :county
Expand Down
4 changes: 4 additions & 0 deletions lib/checkr/education_verification.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ module Checkr
class EducationVerification < APIResource

attribute :status
attribute :result
attribute :cancellation_reason
attribute :cancellation_reason_description
attribute :includes_canceled
attribute :completed_at
attribute :turnaround_time
attribute :records
Expand Down
4 changes: 4 additions & 0 deletions lib/checkr/employment_verification.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ module Checkr
class EmploymentVerification < APIResource

attribute :status
attribute :result
attribute :cancellation_reason
attribute :cancellation_reason_description
attribute :includes_canceled
attribute :completed_at
attribute :turnaround_time
attribute :records
Expand Down
3 changes: 3 additions & 0 deletions lib/checkr/eviction_search.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ module Checkr
class EvictionSearch < APIResource

attribute :status
attribute :result
attribute :cancellation_reason
attribute :cancellation_reason_description
attribute :completed_at
attribute :turnaround_time
attribute :records
Expand Down
3 changes: 3 additions & 0 deletions lib/checkr/federal_civil_search.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ module Checkr
class FederalCivilSearch < APIResource

attribute :status
attribute :result
attribute :cancellation_reason
attribute :cancellation_reason_description
attribute :completed_at
attribute :turnaround_time
attribute :records
Expand Down
3 changes: 3 additions & 0 deletions lib/checkr/federal_criminal_search.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ module Checkr
class FederalCriminalSearch < APIResource

attribute :status
attribute :result
attribute :cancellation_reason
attribute :cancellation_reason_description
attribute :completed_at
attribute :turnaround_time
attribute :records
Expand Down
3 changes: 3 additions & 0 deletions lib/checkr/global_watchlist_search.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ module Checkr
class GlobalWatchlistSearch < APIResource

attribute :status
attribute :result
attribute :cancellation_reason
attribute :cancellation_reason_description
attribute :completed_at
attribute :turnaround_time
attribute :records
Expand Down
3 changes: 3 additions & 0 deletions lib/checkr/motor_vehicle_report.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ module Checkr
class MotorVehicleReport < APIResource

attribute :status
attribute :result
attribute :cancellation_reason
attribute :cancellation_reason_description
attribute :completed_at
attribute :turnaround_time
attribute :full_name
Expand Down
3 changes: 3 additions & 0 deletions lib/checkr/national_criminal_search.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ module Checkr
class NationalCriminalSearch < APIResource

attribute :status
attribute :result
attribute :cancellation_reason
attribute :cancellation_reason_description
attribute :completed_at
attribute :turnaround_time
attribute :records
Expand Down
3 changes: 3 additions & 0 deletions lib/checkr/sex_offender_search.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ module Checkr
class SexOffenderSearch < APIResource

attribute :status
attribute :result
attribute :cancellation_reason
attribute :cancellation_reason_description
attribute :values
attribute :completed_at
attribute :turnaround_time
Expand Down
3 changes: 3 additions & 0 deletions lib/checkr/ssn_trace.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ module Checkr
class SSNTrace < APIResource

attribute :status
attribute :result
attribute :cancellation_reason
attribute :cancellation_reason_description
attribute :completed_at
attribute :turnaround_time
attribute :ssn
Expand Down
3 changes: 3 additions & 0 deletions lib/checkr/state_criminal_search.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ module Checkr
class StateCriminalSearch < APIResource

attribute :status
attribute :result
attribute :cancellation_reason
attribute :cancellation_reason_description
attribute :completed_at
attribute :turnaround_time
attribute :state
Expand Down
32 changes: 32 additions & 0 deletions test/checkr/county_criminal_search_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,18 @@ class CountyCriminalSearchTest < Test::Unit::TestCase
assert_equal(test_county_criminal_search[:status], @county_criminal_search.status)
end

should 'have the result attribute' do
assert_equal(test_county_criminal_search[:result], @county_criminal_search.result)
end

should 'have the cancellation_reason attribute' do
assert_equal(test_county_criminal_search[:cancellation_reason], @county_criminal_search.cancellation_reason)
end

should 'have the cancellation_reason_description attribute' do
assert_equal(test_county_criminal_search[:cancellation_reason_description], @county_criminal_search.cancellation_reason_description)
end

should 'have the created_at attribute' do
assert_equal(test_county_criminal_search[:created_at], @county_criminal_search.created_at)
end
Expand All @@ -73,6 +85,26 @@ class CountyCriminalSearchTest < Test::Unit::TestCase

end

context 'have cancellation reasons' do
setup do
@mock.expects(:get).once.returns(test_response(test_county_criminal_search.merge(
{
status: 'canceled',
result: nil,
cancellation_reason: 'complete_now_customer_requested',
cancellation_reason_description: 'Customer requested Complete Now prior to screening completion',
})))
@county_criminal_search = CountyCriminalSearch.retrieve('county_criminal_search_id')
end

should 'have the correct attribute' do
assert_equal(@county_criminal_search.status, 'canceled')
assert_equal(@county_criminal_search.result, nil)
assert_equal(@county_criminal_search.cancellation_reason, 'complete_now_customer_requested')
assert_equal(@county_criminal_search.cancellation_reason_description, 'Customer requested Complete Now prior to screening completion')
end
end

should 'be registered' do
assert(APIClass.subclasses.include?(CountyCriminalSearch))
assert_equal(CountyCriminalSearch, APIClass.subclass_fetch("county_criminal_search"))
Expand Down
16 changes: 16 additions & 0 deletions test/checkr/education_verification_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,22 @@ class EducationVerificationTest < Test::Unit::TestCase
assert_equal(test_education_verification[:status], @education_verification.status)
end

should 'have the result attribute' do
assert_equal(test_education_verification[:result], @education_verification.result)
end

should 'have the cancellation_reason attribute' do
assert_equal(test_education_verification[:cancellation_reason], @education_verification.cancellation_reason)
end

should 'have the cancellation_reason_description attribute' do
assert_equal(test_education_verification[:cancellation_reason_description], @education_verification.cancellation_reason_description)
end

should 'have the includes_canceled attribute' do
assert_equal(test_education_verification[:includes_canceled], @education_verification.includes_canceled)
end

should 'have the created_at attribute' do
assert_equal(test_education_verification[:created_at],
@education_verification.created_at)
Expand Down
16 changes: 16 additions & 0 deletions test/checkr/employment_verification_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,22 @@ class EmploymentVerificationTest < Test::Unit::TestCase
assert_equal(test_employment_verification[:status], @employment_verification.status)
end

should 'have the result attribute' do
assert_equal(test_employment_verification[:result], @employment_verification.result)
end

should 'have the cancellation_reason attribute' do
assert_equal(test_employment_verification[:cancellation_reason], @employment_verification.cancellation_reason)
end

should 'have the cancellation_reason_description attribute' do
assert_equal(test_employment_verification[:cancellation_reason_description], @employment_verification.cancellation_reason_description)
end

should 'have the includes_canceled attribute' do
assert_equal(test_employment_verification[:includes_canceled], @employment_verification.includes_canceled)
end

should 'have the created_at attribute' do
assert_equal(test_employment_verification[:created_at],
@employment_verification.created_at)
Expand Down
12 changes: 12 additions & 0 deletions test/checkr/eviction_search_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,18 @@ class EvictionSearchTest < Test::Unit::TestCase
assert_equal(test_eviction_search[:status], @eviction_search.status)
end

should 'have the result attribute' do
assert_equal(test_eviction_search[:result], @eviction_search.result)
end

should 'have the cancellation_reason attribute' do
assert_equal(test_eviction_search[:cancellation_reason], @eviction_search.cancellation_reason)
end

should 'have the cancellation_reason_description attribute' do
assert_equal(test_eviction_search[:cancellation_reason_description], @eviction_search.cancellation_reason_description)
end

should 'have the created_at attribute' do
assert_equal(test_eviction_search[:created_at], @eviction_search.created_at)
end
Expand Down
12 changes: 12 additions & 0 deletions test/checkr/federal_civil_search_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,18 @@ class FederalCivilSearchTest < Test::Unit::TestCase
assert_equal(test_federal_civil_search[:status], @federal_civil_search.status)
end

should 'have the result attribute' do
assert_equal(test_federal_civil_search[:result], @federal_civil_search.result)
end

should 'have the cancellation_reason attribute' do
assert_equal(test_federal_civil_search[:cancellation_reason], @federal_civil_search.cancellation_reason)
end

should 'have the cancellation_reason_description attribute' do
assert_equal(test_federal_civil_search[:cancellation_reason_description], @federal_civil_search.cancellation_reason_description)
end

should 'have the created_at attribute' do
assert_equal(test_federal_civil_search[:created_at], @federal_civil_search.created_at)
end
Expand Down
12 changes: 12 additions & 0 deletions test/checkr/federal_criminal_search_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,18 @@ class FederalCriminalSearchTest < Test::Unit::TestCase
assert_equal(test_federal_criminal_search[:status], @federal_criminal_search.status)
end

should 'have the result attribute' do
assert_equal(test_federal_criminal_search[:result], @federal_criminal_search.result)
end

should 'have the cancellation_reason attribute' do
assert_equal(test_federal_criminal_search[:cancellation_reason], @federal_criminal_search.cancellation_reason)
end

should 'have the cancellation_reason_description attribute' do
assert_equal(test_federal_criminal_search[:cancellation_reason_description], @federal_criminal_search.cancellation_reason_description)
end

should 'have the created_at attribute' do
assert_equal(test_federal_criminal_search[:created_at], @federal_criminal_search.created_at)
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,18 @@ class GlobalWatchlistSearchTest < Test::Unit::TestCase
assert_equal(test_global_watchlist_search[:status], @global_watchlist_search.status)
end

should 'have the result attribute' do
assert_equal(test_global_watchlist_search[:result], @global_watchlist_search.result)
end

should 'have the cancellation_reason attribute' do
assert_equal(test_global_watchlist_search[:cancellation_reason], @global_watchlist_search.cancellation_reason)
end

should 'have the cancellation_reason_description attribute' do
assert_equal(test_global_watchlist_search[:cancellation_reason_description], @global_watchlist_search.cancellation_reason_description)
end

should 'have the created_at attribute' do
assert_equal(test_global_watchlist_search[:created_at], @global_watchlist_search.created_at)
end
Expand Down
12 changes: 12 additions & 0 deletions test/checkr/motor_vehicle_report_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,18 @@ class MotorVehicleReportTest < Test::Unit::TestCase
assert_equal(test_motor_vehicle_report[:status], @motor_vehicle_report.status)
end

should 'have the result attribute' do
assert_equal(test_motor_vehicle_report[:result], @motor_vehicle_report.result)
end

should 'have the cancellation_reason attribute' do
assert_equal(test_motor_vehicle_report[:cancellation_reason], @motor_vehicle_report.cancellation_reason)
end

should 'have the cancellation_reason_description attribute' do
assert_equal(test_motor_vehicle_report[:cancellation_reason_description], @motor_vehicle_report.cancellation_reason_description)
end

should 'have the created_at attribute' do
assert_equal(test_motor_vehicle_report[:created_at], @motor_vehicle_report.created_at)
end
Expand Down
12 changes: 12 additions & 0 deletions test/checkr/national_criminal_search_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,18 @@ class NationalCriminalSearchTest < Test::Unit::TestCase
assert_equal(test_national_criminal_search[:status], @national_criminal_search.status)
end

should 'have the result attribute' do
assert_equal(test_national_criminal_search[:result], @national_criminal_search.result)
end

should 'have the cancellation_reason attribute' do
assert_equal(test_national_criminal_search[:cancellation_reason], @national_criminal_search.cancellation_reason)
end

should 'have the cancellation_reason_description attribute' do
assert_equal(test_national_criminal_search[:cancellation_reason_description], @national_criminal_search.cancellation_reason_description)
end

should 'have the created_at attribute' do
assert_equal(test_national_criminal_search[:created_at], @national_criminal_search.created_at)
end
Expand Down
8 changes: 8 additions & 0 deletions test/checkr/report_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@ class ReportTest < Test::Unit::TestCase
assert_equal(test_report[:status], @report.status)
end

should 'have the result attribute' do
assert_equal(test_report[:result], @report.result)
end

should 'have the includes_canceled attribute' do
assert_equal(test_report[:includes_canceled], @report.includes_canceled)
end

should 'have the adjudication attribute' do
assert_equal(test_report[:adjudication], @report.adjudication)
end
Expand Down
12 changes: 12 additions & 0 deletions test/checkr/sex_offender_search_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,18 @@ class SexOffenderSearchTest < Test::Unit::TestCase
assert_equal(test_sex_offender_search[:status], @sex_offender_search.status)
end

should 'have the result attribute' do
assert_equal(test_sex_offender_search[:result], @sex_offender_search.result)
end

should 'have the cancellation_reason attribute' do
assert_equal(test_sex_offender_search[:cancellation_reason], @sex_offender_search.cancellation_reason)
end

should 'have the cancellation_reason_description attribute' do
assert_equal(test_sex_offender_search[:cancellation_reason_description], @sex_offender_search.cancellation_reason_description)
end

should 'have the created_at attribute' do
assert_equal(test_sex_offender_search[:created_at], @sex_offender_search.created_at)
end
Expand Down
12 changes: 12 additions & 0 deletions test/checkr/ssn_trace_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,18 @@ class SSNTraceTest < Test::Unit::TestCase
assert_equal(test_ssn_trace[:status], @ssn_trace.status)
end

should 'have the result attribute' do
assert_equal(test_ssn_trace[:result], @ssn_trace.result)
end

should 'have the cancellation_reason attribute' do
assert_equal(test_ssn_trace[:cancellation_reason], @ssn_trace.cancellation_reason)
end

should 'have the cancellation_reason_description attribute' do
assert_equal(test_ssn_trace[:cancellation_reason_description], @ssn_trace.cancellation_reason_description)
end

should 'have the created_at attribute' do
assert_equal(test_ssn_trace[:created_at], @ssn_trace.created_at)
end
Expand Down
Loading