ssci_inc 0.1.22 → 0.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/ssci_inc/response.rb +4 -4
- data/lib/ssci_inc/version.rb +1 -1
- data/test/test_helper.rb +89 -5
- data/test/unit/response_test.rb +13 -4
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e2bb0b430565d197ace113ff831e4699dee9ef9f
|
|
4
|
+
data.tar.gz: 602aab062f3b73d77f33af322c9fb9b66e5974c3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a59d77fea4ee758c518e4276360dc38bdd2f66704ae94aa94cd87a3717e68985415607c4d5c3fcbfc939d01e692dcc02a6ccf25c9748823071603ca53498a58b
|
|
7
|
+
data.tar.gz: e0a5219a00c84248ea6bfce100ce37b239831f1a340b7c88520dcd9f6dadc453b9e9e3dfa6492fb3f539bf308e91ae4ff6a8ff890ffc0f0fc8002f6506a91e6b
|
data/lib/ssci_inc/response.rb
CHANGED
|
@@ -23,10 +23,10 @@ module SsciInc
|
|
|
23
23
|
@order_status = document.at("//OrderStatus").try(:text)
|
|
24
24
|
@result_status = document.at("//ResultStatus").try(:text)
|
|
25
25
|
@date_order_received = document.at("//DateOrderReceived").try(:text)
|
|
26
|
-
@result_url = document.at("//
|
|
27
|
-
document.at("//
|
|
28
|
-
@
|
|
29
|
-
|
|
26
|
+
@result_url = document.at("//InternetWebAddress//CDATA").try(:text)
|
|
27
|
+
@result_url = document.at("//InternetWebAddress").try(:text) unless @result_url
|
|
28
|
+
@order_id = document.at("//Receipt").try(:text)
|
|
29
|
+
@reference_id = document.at("//ExtraIdentifier").try(:text)
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
end
|
data/lib/ssci_inc/version.rb
CHANGED
data/test/test_helper.rb
CHANGED
|
@@ -96,17 +96,101 @@ class Test::Unit::TestCase
|
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
TEST_CALLBACK_RESPONSE = %Q{
|
|
99
|
+
<?xml version = "1.0" encoding="Windows-1252" standalone="yes"?>
|
|
100
|
+
<BackgroundReports xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" userId="jc7ht3fshg" password="y9kk2m6ia3" version="1.0">
|
|
101
|
+
<BatchData>
|
|
102
|
+
<DestSiteIdentifier>IT2176759327</DestSiteIdentifier>
|
|
103
|
+
<SourceSiteIdentifier>IMAGINATION2</SourceSiteIdentifier>
|
|
104
|
+
<AcctCode>KEHVNS</AcctCode> <BatchID>IT2_00000347</BatchID>
|
|
105
|
+
<RecordCount>1</RecordCount>
|
|
106
|
+
</BatchData>
|
|
99
107
|
<BackgroundReportPackage type="report">
|
|
100
108
|
<ScreeningStatus>
|
|
101
|
-
<ExtraIdentifier>order_id</ExtraIdentifier>
|
|
102
109
|
<OrderStatus>COMPLETE</OrderStatus>
|
|
103
110
|
<ResultStatus>PASS</ResultStatus>
|
|
104
|
-
<
|
|
105
|
-
<
|
|
106
|
-
<
|
|
107
|
-
<
|
|
111
|
+
<DiscrepancyReason>Possible Hit</DiscrepancyReason>
|
|
112
|
+
<DateOrderReceived>04/05/17 @ 10:45</DateOrderReceived>
|
|
113
|
+
<DateOrderCompleted>04/05/17 @ 10:46</DateOrderCompleted>
|
|
114
|
+
<ReturnedResultsFormat>3</ReturnedResultsFormat>
|
|
115
|
+
</ScreeningStatus>
|
|
116
|
+
<ScreeningsSummary>
|
|
117
|
+
<PersonalData>
|
|
118
|
+
<PersonName>
|
|
119
|
+
<GivenName>BILLY</GivenName>
|
|
120
|
+
<MiddleName>BOB</MiddleName>
|
|
121
|
+
<FamilyName>ANDERSON</FamilyName>
|
|
122
|
+
</PersonName>
|
|
123
|
+
<DemographicDetail>
|
|
124
|
+
<Ssn>123456789</Ssn>
|
|
125
|
+
<DateOfBirth>06/18/1997</DateOfBirth>
|
|
126
|
+
<Race></Race>
|
|
127
|
+
<Gender></Gender>
|
|
128
|
+
</DemographicDetail>
|
|
129
|
+
<RequestIdData>
|
|
130
|
+
<Requestor>Timmy</Requestor>
|
|
131
|
+
<ExtraIdentifier>order_id</ExtraIdentifier>
|
|
132
|
+
</RequestIdData>
|
|
133
|
+
</PersonalData>
|
|
134
|
+
</ScreeningsSummary>
|
|
135
|
+
<Screenings>
|
|
136
|
+
<Screening type="link">
|
|
137
|
+
<ScreeningResults type="result" mediaType="pdf" resultType="report">
|
|
138
|
+
<Status>SUPPLEMENTAL</Status>
|
|
139
|
+
<InternetWebAddress>https://testing.secure-screening.net/tstit2/LatestBetaResults/IT2_00008240_0524170827.PDF</InternetWebAddress>
|
|
140
|
+
</ScreeningResults>
|
|
141
|
+
</Screening>
|
|
142
|
+
</Screenings>
|
|
143
|
+
</BackgroundReportPackage>
|
|
144
|
+
</BackgroundReports>
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
TEST_REPOST_RESPONSE = %Q{
|
|
148
|
+
<?xml version = "1.0" encoding="Windows-1252" standalone="yes"?>
|
|
149
|
+
<BackgroundReports xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" userId="jc7ht3fshg" password="y9kk2m6ia3" version="1.0">
|
|
150
|
+
<BatchData>
|
|
151
|
+
<DestSiteIdentifier>IT2176759327</DestSiteIdentifier>
|
|
152
|
+
<SourceSiteIdentifier>IMAGINATION2</SourceSiteIdentifier>
|
|
153
|
+
<AcctCode>KEHVNS</AcctCode> <BatchID>IT2_00000347</BatchID>
|
|
154
|
+
<RecordCount>1</RecordCount>
|
|
155
|
+
</BatchData>
|
|
156
|
+
<BackgroundReportPackage type="report">
|
|
157
|
+
<ScreeningStatus>
|
|
158
|
+
<OrderStatus>SUPPLEMENTAL</OrderStatus>
|
|
159
|
+
<ResultStatus>PASS</ResultStatus>
|
|
160
|
+
<DiscrepancyReason>Possible Hit</DiscrepancyReason>
|
|
161
|
+
<DateOrderReceived>04/05/17 @ 10:45</DateOrderReceived>
|
|
162
|
+
<DateOrderCompleted>04/05/17 @ 10:46</DateOrderCompleted>
|
|
163
|
+
<ReturnedResultsFormat>3</ReturnedResultsFormat>
|
|
108
164
|
</ScreeningStatus>
|
|
165
|
+
<ScreeningsSummary>
|
|
166
|
+
<PersonalData>
|
|
167
|
+
<PersonName>
|
|
168
|
+
<GivenName>BILLY</GivenName>
|
|
169
|
+
<MiddleName>BOB</MiddleName>
|
|
170
|
+
<FamilyName>ANDERSON</FamilyName>
|
|
171
|
+
</PersonName>
|
|
172
|
+
<DemographicDetail>
|
|
173
|
+
<Ssn>123456789</Ssn>
|
|
174
|
+
<DateOfBirth>06/18/1997</DateOfBirth>
|
|
175
|
+
<Race></Race>
|
|
176
|
+
<Gender></Gender>
|
|
177
|
+
</DemographicDetail>
|
|
178
|
+
<RequestIdData>
|
|
179
|
+
<Requestor>Timmy</Requestor>
|
|
180
|
+
<ExtraIdentifier>order_id</ExtraIdentifier>
|
|
181
|
+
</RequestIdData>
|
|
182
|
+
</PersonalData>
|
|
183
|
+
</ScreeningsSummary>
|
|
184
|
+
<Screenings>
|
|
185
|
+
<Screening type="link">
|
|
186
|
+
<ScreeningResults type="result" mediaType="pdf" resultType="report">
|
|
187
|
+
<Status>SUPPLEMENTAL</Status>
|
|
188
|
+
<InternetWebAddress>https://testing.secure-screening.net/tstit2/LatestBetaResults/IT2_00008240_0524170827.PDF</InternetWebAddress>
|
|
189
|
+
</ScreeningResults>
|
|
190
|
+
</Screening>
|
|
191
|
+
</Screenings>
|
|
109
192
|
</BackgroundReportPackage>
|
|
193
|
+
</BackgroundReports>
|
|
110
194
|
}
|
|
111
195
|
|
|
112
196
|
end
|
data/test/unit/response_test.rb
CHANGED
|
@@ -35,7 +35,6 @@ module SsciInc
|
|
|
35
35
|
|
|
36
36
|
should "have populated order id" do
|
|
37
37
|
assert_equal "receipt_id", subject.order_id
|
|
38
|
-
# assert_equal "order_id", subject.order_id TODO: uncomment this and delete line above when SSCI delivers integration
|
|
39
38
|
end
|
|
40
39
|
end
|
|
41
40
|
|
|
@@ -45,9 +44,19 @@ module SsciInc
|
|
|
45
44
|
should "have a result status and result info" do
|
|
46
45
|
assert_equal "COMPLETE", subject.order_status
|
|
47
46
|
assert_equal "PASS", subject.result_status
|
|
48
|
-
assert_equal "https://
|
|
49
|
-
assert_equal "
|
|
50
|
-
|
|
47
|
+
assert_equal "https://testing.secure-screening.net/tstit2/LatestBetaResults/IT2_00008240_0524170827.PDF", subject.result_url
|
|
48
|
+
assert_equal "order_id", subject.reference_id
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
context "re-posted response" do
|
|
53
|
+
subject { Response.new(TEST_REPOST_RESPONSE) }
|
|
54
|
+
|
|
55
|
+
should "have a result status and result info" do
|
|
56
|
+
assert_equal "SUPPLEMENTAL", subject.order_status
|
|
57
|
+
assert_equal "PASS", subject.result_status
|
|
58
|
+
assert_equal "https://testing.secure-screening.net/tstit2/LatestBetaResults/IT2_00008240_0524170827.PDF", subject.result_url
|
|
59
|
+
assert_equal "order_id", subject.reference_id
|
|
51
60
|
end
|
|
52
61
|
end
|
|
53
62
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ssci_inc
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.23
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jon Alme
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-05-
|
|
11
|
+
date: 2017-05-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: httparty
|