• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pulibrary / tigerdata-app / 529f7cba-0651-41c2-9045-ff17f0a5a349

21 Oct 2025 09:43PM UTC coverage: 86.877%. Remained the same
529f7cba-0651-41c2-9045-ff17f0a5a349

Pull #2070

circleci

bess
Remove tests for special production behavior
Pull Request #2070: Remove tests for special behavior in production

2615 of 3010 relevant lines covered (86.88%)

340.18 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/app/presenters/dashboard_presenter.rb
1
# frozen_string_literal: true
2
class DashboardPresenter
3✔
3
  attr_reader :current_user
3✔
4
  def initialize(current_user:)
3✔
5
    @current_user = current_user
91✔
6
  end
7

8
  def all_projects
3✔
9
    return [] unless current_user&.eligible_sysadmin?
7✔
10

11
    @all_projects ||= Project.all_projects.map { |project| ProjectDashboardPresenter.new(project) }.sort_by(&:updated_at).reverse
16✔
12
    @all_projects
6✔
13
  end
14

15
  def dashboard_projects
3✔
16
    @dashboard_projects ||= Project.users_projects(current_user).map { |project| ProjectDashboardPresenter.new(project) }.sort_by(&:updated_at).reverse
165✔
17
    @dashboard_projects
80✔
18
  end
19

20
  def my_inventory_requests
3✔
21
    @my_inventory_requests ||= current_user.user_requests.where(type: "FileInventoryRequest")
2✔
22
  end
23

24
  def my_draft_requests
3✔
25
    @my_draft_requests ||= Request.where(requested_by: current_user.uid, state: Request::DRAFT)
46✔
26
  end
27

28
  def my_submitted_requests
3✔
29
    @my_submitted_requests ||= Request.where(requested_by: current_user.uid, state: Request::SUBMITTED)
46✔
30
  end
31
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc