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
Showing
5 changed files
with
60 additions
and
28 deletions.
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 @@ | ||
# experian tech support: 800 854 7201 | ||
# to change test password: https://stg1-ss1.experian.com/ssp/jsp/updateprofile.jsp | ||
development: &defaults | ||
experian: | ||
host: stg1.experian.com | ||
path: /lookupServlet1?lookupServiceName=AccessPoint&lookupServiceVersion=1.0&serviceName=NetConnectDemo&serviceVersion=2.0&responseType=text/plain | ||
username: microplace | ||
password: microplacedev10 | ||
eai: SQN9O42F | ||
preamble: TBD1 | ||
subcode: 1004511 | ||
vendor_number: F42 | ||
db_host: PRECISE_ID_TEST | ||
|
||
test: | ||
<<: *defaults | ||
|
||
production: | ||
<<: *defaults |
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
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 |
---|---|---|
@@ -1,17 +1,23 @@ | ||
require File.dirname(__FILE__) + '/../../test_helper' | ||
p ">>>#{File.dirname(__FILE__)}<<<" | ||
require File.dirname(__FILE__) + '/test_helper' | ||
require 'request' | ||
|
||
require 'experian/request' | ||
|
||
class Experian::RequestTest < Test::Unit::TestCase | ||
|
||
def test_should_build_an_xml_request_from_a_user_active_record | ||
user = User.new(:address1 => "address1", :address2 => "address2", :city => "city") | ||
request = Experian::Request.new(user) | ||
class RequestTest < Test::Unit::TestCase | ||
def test_should_build_an_xml_request_from_a_user | ||
user = { | ||
:first_name => "the first name", | ||
:last_name => "the last name", | ||
:address1 => "the address1", | ||
:address2 => "the address2", | ||
:city => "the city" | ||
} | ||
request = Request.new(user, EXPERIAN_CONFIG["experian"]) | ||
|
||
xml_request = request.to_xml | ||
|
||
document = REXML::Document.new(xml_request) | ||
element = REXML::XPath.first(document, "//Street") | ||
# p element | ||
|
||
assert_not_nil xml_request.index("<Surname>the last name</Surname>") | ||
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,3 @@ | ||
require 'yaml' | ||
EXPERIAN_CONFIG = YAML.load_file("../config/config.yml")["test"] | ||
require 'test/unit' |
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 @@ | ||
# Uninstall hook code here |