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

source-academy / backend / e0330f2cf38b2d8af12bffd20f4cac2158d607fc-PR-1236

31 Mar 2025 09:12AM UTC coverage: 19.982% (-73.6%) from 93.607%
e0330f2cf38b2d8af12bffd20f4cac2158d607fc-PR-1236

Pull #1236

github

RichDom2185
Redate migrations to maintain total ordering
Pull Request #1236: Added Exam mode

12 of 57 new or added lines in 8 files covered. (21.05%)

2430 existing lines in 97 files now uncovered.

671 of 3358 relevant lines covered (19.98%)

3.03 hits per line

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

0.0
/lib/cadet_web/admin_views/admin_goals_view.ex
1
defmodule CadetWeb.AdminGoalsView do
2
  use CadetWeb, :view
3
  use Timex
4

5
  def render("index.json", %{goals: goals}) do
UNCOV
6
    render_many(goals, CadetWeb.AdminGoalsView, "goal.json", as: :goal)
×
7
  end
8

9
  def render("index_goals_with_progress.json", %{goals: goals}) do
UNCOV
10
    render_many(goals, CadetWeb.AdminGoalsView, "goal_with_progress.json", as: :goal)
×
11
  end
12

13
  def render("goal.json", %{goal: goal}) do
UNCOV
14
    transform_map_for_view(goal, %{
×
15
      uuid: :uuid,
16
      text: :text,
17
      targetCount: :target_count,
18
      type: :type,
19
      meta: :meta
20
    })
21
  end
22

23
  def render("goal_with_progress.json", %{goal: goal}) do
UNCOV
24
    transform_map_for_view(goal, %{
×
25
      uuid: :uuid,
26
      text: :text,
27
      count: fn
UNCOV
28
        %{progress: [%{count: count}]} -> count
×
29
        _ -> 0
×
30
      end,
31
      completed: fn
UNCOV
32
        %{progress: [%{completed: completed}]} -> completed
×
33
        _ -> false
×
34
      end,
35
      targetCount: :target_count,
36
      type: :type,
37
      meta: :meta,
38
      achievementUuids:
UNCOV
39
        &Enum.map(&1.achievements, fn achievement -> achievement.achievement_uuid end)
×
40
    })
41
  end
42
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