パスワード列(バイナリデータ型)を持つテスト用のフィクスチャをロードしようとしています。私が使用しているツールは、EzCrypto gemを使用して、パスワードを保存/取得する前に暗号化および復号化します。私の列がバイナリの場合、railsはパスワードを暗号化されたものとして自動的に保存すると思いましたが、取得できるのは次のとおりです。
1.1。
Error:
test_is_working(FirstTest):
RuntimeError: Failed to decode the field. Incorrect key?
/Library/Ruby/Gems/1.8/gems/mislav-will_paginate 2.3.11/lib/will_paginate/finder.rb:170:in 'method_missing'
unit/first_test.rb:8:in setup
2.2。
Error:
test_sanity(FirstTest):
RuntimeError: Failed to decode the field. Incorrect key?
unit/first_test.rb:8:in `setup'
Fixture file looks like this:
first_hussle:
type: FirstAccount
user: jsewq
username: abc@mac.com
password: 'abc123'
手がかりはありますか?