mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-01-31 09:39:08 +01:00
Appease the dog overlords
This commit is contained in:
parent
6344b55b44
commit
977ebdfe4d
5 changed files with 13 additions and 13 deletions
|
@ -15,7 +15,7 @@ class TimelineController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def list
|
def list
|
||||||
@list = current_user.lists.find_by_name!(params[:list_name])
|
@list = current_user.lists.find_by!(name: params[:list_name])
|
||||||
@timeline = @list.cursored_timeline(last_id: params[:last_id])
|
@timeline = @list.cursored_timeline(last_id: params[:last_id])
|
||||||
@timeline_last_id = @timeline.map(&:id).min
|
@timeline_last_id = @timeline.map(&:id).min
|
||||||
@more_data_available = !@list.cursored_timeline(last_id: @timeline_last_id, size: 1).count.zero?
|
@more_data_available = !@list.cursored_timeline(last_id: @timeline_last_id, size: 1).count.zero?
|
||||||
|
|
|
@ -6,12 +6,12 @@ describe AboutController, type: :controller do
|
||||||
describe "#about" do
|
describe "#about" do
|
||||||
subject { get :about }
|
subject { get :about }
|
||||||
|
|
||||||
before(:each) {
|
before(:each) do
|
||||||
FactoryBot.create(:user, { confirmed_at: Time.current, answered_count: 1 })
|
FactoryBot.create(:user, { confirmed_at: Time.current, answered_count: 1 })
|
||||||
FactoryBot.create(:user, { confirmed_at: Time.current, answered_count: 1 }).ban
|
FactoryBot.create(:user, { confirmed_at: Time.current, answered_count: 1 }).ban
|
||||||
FactoryBot.create(:user, { confirmed_at: Time.current })
|
FactoryBot.create(:user, { confirmed_at: Time.current })
|
||||||
FactoryBot.create(:user, { confirmed_at: Time.current }).ban
|
FactoryBot.create(:user, { confirmed_at: Time.current }).ban
|
||||||
}
|
end
|
||||||
|
|
||||||
it "shows the correct user count" do
|
it "shows the correct user count" do
|
||||||
subject
|
subject
|
||||||
|
|
Loading…
Reference in a new issue