mirror of
https://github.com/internetee/epp_proxy.git
synced 2025-08-22 07:00:47 +02:00
Add test case for error request
This commit is contained in:
parent
7f7eea8149
commit
45f99a2f77
3 changed files with 38 additions and 5 deletions
|
@ -27,7 +27,11 @@ class BackendServer < Roda
|
|||
|
||||
end
|
||||
|
||||
r.on "error" do
|
||||
r.get "error" do
|
||||
@code = r.params['code']
|
||||
@msg = r.params['msg']
|
||||
|
||||
render("error")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
13
apps/epp_proxy/priv/test_backend_app/views/error.erb
Normal file
13
apps/epp_proxy/priv/test_backend_app/views/error.erb
Normal file
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<epp xmlns="https://epp.tld.ee/schema/epp-ee-1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="lib/schemas/epp-ee-1.0.xsd">
|
||||
<response>
|
||||
<result code="<%= @code %>">
|
||||
<msg lang="en">
|
||||
<%= @msg %>
|
||||
</msg>
|
||||
</result>
|
||||
<trID>
|
||||
<svTRID>ccReg-4018856528</svTRID>
|
||||
</trID>
|
||||
</response>
|
||||
</epp>
|
Loading…
Add table
Add a link
Reference in a new issue