Displaying 1 result from an estimated 1 matches for "the_encrypt".
Did you mean:
the_encrypter
2010 Nov 04
1
Calling a method directly from a test => no method error
...ield].blank?
key = model.class.encryption_key
model[@field] = decrypt(model[@field], key, @options)
end
end
end
end
end
Here is the test:
require ''test_helper''
class UserTest < ActiveSupport::TestCase
fixtures :users
test "the_encrypter" do
@user = users(:bob)
@user.secret_answer = "Volvo"
assert @user.save
@answer = User.connection.select_all(
"select secret_answer from users where id = 1"
)
cipher_text = @answer.first[''secret_answer'']
opts = Encryptor...