Sha256: 9b30b466be019c23e3fc3ca170479762fc5ccfe10476e6421336b7d2ae5bab62
Contents?: true
Size: 875 Bytes
Versions: 15
Compression:
Stored size: 875 Bytes
Contents
require 'spec_helper' def sasl_error_node(err_name = 'aborted') node = Blather::XMPPNode.new 'failure' node.namespace = Blather::SASLError::SASL_ERR_NS node << Blather::XMPPNode.new(err_name, node.document) node end describe Blather::SASLError do it 'can import a node' do Blather::SASLError.must_respond_to :import e = Blather::SASLError.import sasl_error_node e.must_be_kind_of Blather::SASLError end describe 'each XMPP SASL error type' do %w[ aborted incorrect-encoding invalid-authzid invalid-mechanism mechanism-too-weak not-authorized temporary-auth-failure ].each do |error_type| it "handles the name for #{error_type}" do e = Blather::SASLError.import sasl_error_node(error_type) e.name.must_equal error_type.gsub('-','_').to_sym end end end end
Version data entries
15 entries across 15 versions & 1 rubygems