mirror of
https://github.com/activerecord-hackery/ransack.git
synced 2022-11-09 13:47:45 -05:00
14 lines
434 B
Ruby
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
|