我正在尝试为我的测试加载一个具有密码列(二进制数据类型)的夹具。我正在使用的工具使用 EzCrypto gem 在存储/检索密码之前对其进行加密和解密。现在,如果我的列是二进制的,我认为 rails 会自动将密码存储为加密 - 但我得到的只是:
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.
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'
任何线索?