Error while using translate field from model while testing using RSpec
milandalsaniya opened this issue · 0 comments
milandalsaniya commented
Hi,
We have been using traco to map translation columns. While testing, when trying to create factory instance using FactoryGirl, its give error as follows.
Code snippet of spec :
describe 'get_email_invitation_text' do it 'should return email invitation text' do get :get_email_invitation_text, params: { lang: 'en' }, xhr: true expect(assigns(:@email_invitation_text)).to eq(@org.email_invitation_text) end end
code line of FactoryGirl :
email_invitation_text {Faker::Lorem::paragraphs.join(' ')}
code line of model where translate used :
translates :email_invitation_text, fallback: false