mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-13 07:49:29 +00:00
Add ability to translate server rules (#34494)
This commit is contained in:
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
|
||||
|
||||
Reference in New Issue
Block a user