summaryrefslogtreecommitdiff
path: root/lib/api/snippets.rb
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-11-01 23:28:26 -0700
committerStan Hu <stanhu@gmail.com>2018-11-07 12:18:04 -0800
commit8fd2c8b16ad7921aae60fbf5536fec263177337d (patch)
treee8de9d500dd8303853cd6f184bde08e27c31f2fe /lib/api/snippets.rb
parentf4023a69cb5e78fca595a2151a2272fbdfd5917a (diff)
downloadgitlab-ce-8fd2c8b16ad7921aae60fbf5536fec263177337d.tar.gz
Prevent attr_encrypted models from being overriden
Fix failing spec in spec/controllers/admin/hooks_controller_spec.rb attr_encrypted expects models to have their attribute methods defined, or it will override them with standard Ruby accessors. Migration specs that rolled back the state of the database after columns were migrated to encrypted values were interfering with these definitions. To ensure that the SystemHook specs pass, we need to call `SystemHook.define_attribute_methods` to ensure that attr_encrypted sees the right methods that reflect the latest state of the database. Closes https://gitlab.com/gitlab-org/gitlab-ee/issues/8234
Diffstat (limited to 'lib/api/snippets.rb')
0 files changed, 0 insertions, 0 deletions