Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

method_spec.rb 2.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. describe CryptCheck::Tls::Method do
  2. describe '#==' do
  3. it 'must be equals to corresponding symbol' do
  4. method = ::CryptCheck::Tls::Method[:TLSv1_2]
  5. expect(method == :SSLv2).to be false
  6. expect(method == :SSLv3).to be false
  7. expect(method == :TLSv1).to be false
  8. expect(method == :TLSv1_1).to be false
  9. expect(method == :TLSv1_2).to be true
  10. end
  11. it 'must be equals to corresponding method' do
  12. method = ::CryptCheck::Tls::Method[:TLSv1_2]
  13. expect(method == ::CryptCheck::Tls::Method[:SSLv2]).to be false
  14. expect(method == ::CryptCheck::Tls::Method[:SSLv3]).to be false
  15. expect(method == ::CryptCheck::Tls::Method[:TLSv1]).to be false
  16. expect(method == ::CryptCheck::Tls::Method[:TLSv1_1]).to be false
  17. expect(method == ::CryptCheck::Tls::Method[:TLSv1_2]).to be true
  18. end
  19. end
  20. # describe '#eql?' do
  21. # it 'must be equals to corresponding symbol' do
  22. # method = ::CryptCheck::Tls::Method[:TLSv1_2]
  23. # expect(method.eql? :SSLv2).to be false
  24. # expect(method.eql? :SSLv3).to be false
  25. # expect(method.eql? :TLSv1).to be false
  26. # expect(method.eql? :TLSv1_1).to be false
  27. # expect(method.eql? :TLSv1_2).to be true
  28. # end
  29. #
  30. # it 'must be equals to corresponding method' do
  31. # method = ::CryptCheck::Tls::Method[:TLSv1_2]
  32. # expect(method.eql? ::CryptCheck::Tls::Method[:SSLv2]).to be false
  33. # expect(method.eql? ::CryptCheck::Tls::Method[:SSLv3]).to be false
  34. # expect(method.eql? ::CryptCheck::Tls::Method[:TLSv1]).to be false
  35. # expect(method.eql? ::CryptCheck::Tls::Method[:TLSv1_1]).to be false
  36. # expect(method.eql? ::CryptCheck::Tls::Method[:TLSv1_2]).to be true
  37. # end
  38. # end
  39. #
  40. # describe '#equal?' do
  41. # it 'must be equals to corresponding symbol' do
  42. # method = ::CryptCheck::Tls::Method[:TLSv1_2]
  43. # expect(method.equal? :SSLv2).to be false
  44. # expect(method.equal? :SSLv3).to be false
  45. # expect(method.equal? :TLSv1).to be false
  46. # expect(method.equal? :TLSv1_1).to be false
  47. # expect(method.equal? :TLSv1_2).to be true
  48. # end
  49. #
  50. # it 'must be equals to corresponding method' do
  51. # method = ::CryptCheck::Tls::Method[:TLSv1_2]
  52. # expect(method.equal? ::CryptCheck::Tls::Method[:SSLv2]).to be false
  53. # expect(method.equal? ::CryptCheck::Tls::Method[:SSLv3]).to be false
  54. # expect(method.equal? ::CryptCheck::Tls::Method[:TLSv1]).to be false
  55. # expect(method.equal? ::CryptCheck::Tls::Method[:TLSv1_1]).to be false
  56. # expect(method.equal? ::CryptCheck::Tls::Method[:TLSv1_2]).to be true
  57. # end
  58. # end
  59. end