test ActiveRecord way