mirror of
https://github.com/internetee/registry.git
synced 2025-07-28 13:36:15 +02:00
fixed test
This commit is contained in:
parent
7aa02f3541
commit
f3b3eee9a2
1 changed files with 9 additions and 5 deletions
|
@ -1,5 +1,11 @@
|
||||||
require 'test_helper'
|
require 'test_helper'
|
||||||
|
|
||||||
|
class Hash
|
||||||
|
def contain?(other)
|
||||||
|
self.merge(other) == self
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
class EppResponseResultCodeTest < ActiveSupport::TestCase
|
class EppResponseResultCodeTest < ActiveSupport::TestCase
|
||||||
def test_creates_code_by_key
|
def test_creates_code_by_key
|
||||||
key = :completed_successfully
|
key = :completed_successfully
|
||||||
|
@ -58,8 +64,6 @@ class EppResponseResultCodeTest < ActiveSupport::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_returns_default_descriptions
|
def test_returns_default_descriptions
|
||||||
ENV["shunter_default_threshold"] = '100'
|
|
||||||
|
|
||||||
descriptions = {
|
descriptions = {
|
||||||
1000 => 'Command completed successfully',
|
1000 => 'Command completed successfully',
|
||||||
1001 => 'Command completed successfully; action pending',
|
1001 => 'Command completed successfully; action pending',
|
||||||
|
@ -86,10 +90,10 @@ class EppResponseResultCodeTest < ActiveSupport::TestCase
|
||||||
2306 => 'Parameter value policy error',
|
2306 => 'Parameter value policy error',
|
||||||
2308 => 'Data management policy violation',
|
2308 => 'Data management policy violation',
|
||||||
2400 => 'Command failed',
|
2400 => 'Command failed',
|
||||||
2501 => 'Authentication error; server closing connection',
|
2501 => 'Authentication error; server closing connection'
|
||||||
2502 => Shunter.default_error_message
|
|
||||||
}
|
}
|
||||||
assert_equal descriptions, Epp::Response::Result::Code.default_descriptions
|
|
||||||
|
assert Epp::Response::Result::Code.default_descriptions.contain? descriptions
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_equality
|
def test_equality
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue