Add ability to translate server rules (#34494)
This commit is contained in:
parent
977164decc
commit
8c51a8ba94
17 changed files with 149 additions and 20 deletions
8
spec/fabricators/rule_translation_fabricator.rb
Normal file
8
spec/fabricators/rule_translation_fabricator.rb
Normal file
|
@ -0,0 +1,8 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
Fabricator(:rule_translation) do
|
||||
text 'MyText'
|
||||
hint 'MyText'
|
||||
language 'en'
|
||||
rule { Fabricate.build(:rule) }
|
||||
end
|
|
@ -11,7 +11,8 @@ RSpec.describe REST::RuleSerializer do
|
|||
it 'returns expected values' do
|
||||
expect(subject)
|
||||
.to include(
|
||||
'id' => be_a(String).and(eq('123'))
|
||||
'id' => be_a(String).and(eq('123')),
|
||||
'translations' => be_a(Hash)
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue