Add ability to filter followed accounts' posts by language (#19095)

This commit is contained in:
Eugen Rochko
2022-09-20 23:51:21 +02:00
committed by GitHub
parent 882e54c786
commit 50948b46aa
30 changed files with 298 additions and 39 deletions

View File

@@ -145,6 +145,17 @@ RSpec.describe Api::V1::AccountsController, type: :controller do
expect(json[:showing_reblogs]).to be false
expect(json[:notifying]).to be true
end
it 'changes languages option' do
post :follow, params: { id: other_account.id, languages: %w(en es) }
json = body_as_json
expect(json[:following]).to be true
expect(json[:showing_reblogs]).to be false
expect(json[:notifying]).to be false
expect(json[:languages]).to match_array %w(en es)
end
end
end

View File

@@ -11,7 +11,7 @@ describe Settings::Exports::FollowingAccountsController do
sign_in user, scope: :user
get :index, format: :csv
expect(response.body).to eq "Account address,Show boosts\nusername@domain,true\n"
expect(response.body).to eq "Account address,Show boosts,Notify on new posts,Languages\nusername@domain,true,false,\n"
end
end
end