Change admin accounts default sort to most recent (#8813)

This commit is contained in:
Eugen Rochko
2018-10-04 16:05:38 +02:00
committed by GitHub
parent 7fe137d2f7
commit e645ae9561
6 changed files with 12 additions and 12 deletions

View File

@ -25,7 +25,7 @@ RSpec.describe Admin::AccountsController, type: :controller do
expect(h[:remote]).to eq '1'
expect(h[:by_domain]).to eq 'domain'
expect(h[:silenced]).to eq '1'
expect(h[:recent]).to eq '1'
expect(h[:alphabetic]).to eq '1'
expect(h[:suspended]).to eq '1'
expect(h[:username]).to eq 'username'
expect(h[:display_name]).to eq 'display name'
@ -40,7 +40,7 @@ RSpec.describe Admin::AccountsController, type: :controller do
remote: '1',
by_domain: 'domain',
silenced: '1',
recent: '1',
alphabetic: '1',
suspended: '1',
username: 'username',
display_name: 'display name',

View File

@ -2,10 +2,10 @@ require 'rails_helper'
describe AccountFilter do
describe 'with empty params' do
it 'defaults to alphabetic account list' do
it 'defaults to recent account list' do
filter = described_class.new({})
expect(filter.results).to eq Account.alphabetic
expect(filter.results).to eq Account.recent
end
end
@ -60,7 +60,7 @@ describe AccountFilter do
end
describe 'that call account methods' do
%i(local remote silenced recent suspended).each do |option|
%i(local remote silenced alphabetic suspended).each do |option|
it "delegates the #{option} option" do
allow(Account).to receive(option).and_return(Account.none)
filter = described_class.new({ option => true })