Sha256: 8a7b23f2d780ff556023000fb0dac2131cca7a7480e6a442dfe7a58f9d9e8fd2

Contents?: true

Size: 836 Bytes

Versions: 3

Compression:

Stored size: 836 Bytes

Contents

require "test_helper"

::ActiveSupport::Deprecation.silence do
  require "authlogic/crypto_providers/wordpress"
end

module CryptoProviderTest
  class WordpressTest < ActiveSupport::TestCase
    def test_matches
      plain = "banana"
      salt = "aaa"
      crypted = "xxx0nope"
      # I couldn't figure out how to even execute this method without it
      # crashing. Maybe, when Jeffry wrote it in 2009, `Digest::MD5.digest`
      # worked differently. He was probably using ruby 1.9 back then.
      # Given that I can't even figure out how to run it, and for all the other
      # reasons I've given in `wordpress.rb`, I'm just going to deprecate
      # the whole file. -Jared 2018-04-09
      assert_raises(NoMethodError) {
        Authlogic::CryptoProviders::Wordpress.matches?(crypted, plain, salt)
      }
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
authlogic-4.2.0 test/crypto_provider_test/wordpress_test.rb
authlogic-4.1.1 test/crypto_provider_test/wordpress_test.rb
authlogic-4.1.0 test/crypto_provider_test/wordpress_test.rb