Commit 03669dea authored by Thong Kuah's avatar Thong Kuah

Merge branch 'revert_sort_order_explore_projects' into 'master'

Revert explore projects default sort to last updated

See merge request gitlab-org/gitlab!54879
parents bf99d5e3 aee255a2
......@@ -97,7 +97,7 @@ class Explore::ProjectsController < Explore::ApplicationController
end
def default_sort_order
sort_value_name
sort_value_latest_activity
end
def sorting_field
......
---
title: Reverts default sort order for Explore Projects to Last updated
merge_request: 54879
author:
type: changed
......@@ -4,6 +4,8 @@ require 'spec_helper'
RSpec.describe Explore::ProjectsController do
shared_examples 'explore projects' do
let(:expected_default_sort) { 'latest_activity_desc' }
describe 'GET #index.json' do
render_views
......@@ -12,6 +14,11 @@ RSpec.describe Explore::ProjectsController do
end
it { is_expected.to respond_with(:success) }
it 'sets a default sort parameter' do
expect(controller.params[:sort]).to eq(expected_default_sort)
expect(assigns[:sort]).to eq(expected_default_sort)
end
end
describe 'GET #trending.json' do
......@@ -22,6 +29,11 @@ RSpec.describe Explore::ProjectsController do
end
it { is_expected.to respond_with(:success) }
it 'sets a default sort parameter' do
expect(controller.params[:sort]).to eq(expected_default_sort)
expect(assigns[:sort]).to eq(expected_default_sort)
end
end
describe 'GET #starred.json' do
......@@ -32,6 +44,11 @@ RSpec.describe Explore::ProjectsController do
end
it { is_expected.to respond_with(:success) }
it 'sets a default sort parameter' do
expect(controller.params[:sort]).to eq(expected_default_sort)
expect(assigns[:sort]).to eq(expected_default_sort)
end
end
describe 'GET #trending' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment