about summary refs log tree commit diff
path: root/spec
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2018-10-04 16:05:38 +0200
committerGitHub <noreply@github.com>2018-10-04 16:05:38 +0200
commite645ae95610fcb69d15366bc32ab60014d2ebdcf (patch)
treeccda1dfdcf18db58aa38dd0565952dfa6e2822ca /spec
parent7fe137d2f7792ed735be11eaca6d87fbc114043a (diff)
Change admin accounts default sort to most recent (#8813)
Diffstat (limited to 'spec')
-rw-r--r--spec/controllers/admin/accounts_controller_spec.rb4
-rw-r--r--spec/models/account_filter_spec.rb6
2 files changed, 5 insertions, 5 deletions
diff --git a/spec/controllers/admin/accounts_controller_spec.rb b/spec/controllers/admin/accounts_controller_spec.rb
index fa2786c9b..ae9e058c8 100644
--- a/spec/controllers/admin/accounts_controller_spec.rb
+++ b/spec/controllers/admin/accounts_controller_spec.rb
@@ -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',
diff --git a/spec/models/account_filter_spec.rb b/spec/models/account_filter_spec.rb
index 8441939c5..0a0252642 100644
--- a/spec/models/account_filter_spec.rb
+++ b/spec/models/account_filter_spec.rb
@@ -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 })