-
Notifications
You must be signed in to change notification settings - Fork 0
/
application_review_test.rb
57 lines (45 loc) · 1.89 KB
/
application_review_test.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
require_relative "application_review"
require "test/unit"
require "json"
class TestApplicationReview < Test::Unit::TestCase
def setup
file = File.read('./application_review_output.json')
@expected_hash = JSON.parse(file)
@application_review_hash = ApplicationReview.to_hash
end
def test_meta_data_is_correct
assert_equal(@application_review_hash["$schema"], @expected_hash["$schema"])
assert_equal(@application_review_hash["type"], @expected_hash["type"])
assert_equal(@application_review_hash["title"], @expected_hash["title"])
end
def test_the_correct_keys_in_all_of
assert_equal(@application_review_hash["allOf"].map{|k| k.keys}, @expected_hash["allOf"].map{|k| k.keys})
end
def test_pii_fields
assert_equal(@application_review_hash["allOf"][0], @expected_hash["allOf"][0])
end
def test_engineering_contractor_dependencies_fields
assert_equal(@application_review_hash["allOf"][1], @expected_hash["allOf"][1])
end
def test_401k_dependencies_fields
assert_equal(@application_review_hash["allOf"][2], @expected_hash["allOf"][2])
end
def test_benefits_dependencies_fields
assert_equal(@application_review_hash["allOf"][3], @expected_hash["allOf"][3])
end
def test_pending_claims_dependencies_fields
assert_equal(@application_review_hash["allOf"][4], @expected_hash["allOf"][4])
end
def test_current_claims_dependencies_fields
assert_equal(@application_review_hash["allOf"][5], @expected_hash["allOf"][5])
end
def test_denied_coverage_dependencies_fields
assert_equal(@application_review_hash["allOf"][6], @expected_hash["allOf"][6])
end
def test_filed_liability_claim_dependecies_fields
assert_equal(@application_review_hash["allOf"][7], @expected_hash["allOf"][7])
end
def test_full_time_worker_dependencies_fields
assert_equal(@application_review_hash["allOf"][8], @expected_hash["allOf"][8])
end
end