mirror of
https://github.com/internetee/registry.git
synced 2025-08-02 16:02:03 +02:00
parent
4163ee9017
commit
1c560b1748
2 changed files with 17 additions and 0 deletions
|
@ -1,8 +1,17 @@
|
|||
require 'test_helper'
|
||||
|
||||
class EppSessionTest < ActiveSupport::TestCase
|
||||
def setup
|
||||
@epp_session = epp_sessions(:api_bestnames)
|
||||
end
|
||||
|
||||
def test_valid
|
||||
assert @epp_session.valid?
|
||||
end
|
||||
|
||||
def test_api_user_id_serialization
|
||||
epp_session = EppSession.new
|
||||
epp_session.session_id = 'test'
|
||||
epp_session.registrar = registrars(:bestnames)
|
||||
epp_session[:api_user_id] = ActiveRecord::Fixtures.identify(:api_bestnames)
|
||||
epp_session.save!
|
||||
|
@ -10,4 +19,10 @@ class EppSessionTest < ActiveSupport::TestCase
|
|||
|
||||
assert_equal ActiveRecord::Fixtures.identify(:api_bestnames), epp_session[:api_user_id]
|
||||
end
|
||||
|
||||
def test_session_id_presence_validation
|
||||
@epp_session.session_id = nil
|
||||
@epp_session.validate
|
||||
assert @epp_session.invalid?
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue