1
0
Fork 0
mirror of https://github.com/activerecord-hackery/ransack.git synced 2022-11-09 13:47:45 -05:00
activerecord-hackery--ransack/spec/mongoid/translate_spec.rb
2014-08-02 10:38:40 -07:00

14 lines
434 B
Ruby

require 'mongoid_spec_helper'
module Ransack
describe Translate do
describe '.attribute' do
it 'translate namespaced attribute like AR does' do
ar_translation = ::Namespace::Article.human_attribute_name(:title)
ransack_translation = Ransack::Translate.attribute(:title, :context => ::Namespace::Article.search.context)
expect(ransack_translation).to eq ar_translation
end
end
end
end