Fix filterable_languages method of SettingsHelper (#4966)
This commit is contained in:
parent
efec507230
commit
48d77ea1eb
7 changed files with 43 additions and 53 deletions
|
@ -65,15 +65,12 @@ RSpec.describe PostStatusService do
|
|||
end
|
||||
|
||||
it 'creates a status with a language set' do
|
||||
detector = double(to_iso_s: :en)
|
||||
allow(LanguageDetector).to receive(:new).and_return(detector)
|
||||
|
||||
account = Fabricate(:account)
|
||||
text = 'test status text'
|
||||
text = 'This is an English text.'
|
||||
|
||||
subject.call(account, text)
|
||||
status = subject.call(account, text)
|
||||
|
||||
expect(LanguageDetector).to have_received(:new).with(text, account)
|
||||
expect(status.language).to eq 'en'
|
||||
end
|
||||
|
||||
it 'processes mentions' do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue