• 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

50.0
/lib/cadet/devices/device_registration.ex
1
defmodule Cadet.Devices.DeviceRegistration do
2
  @moduledoc """
3
  Represents a registration of a remote execution device by a user.
4
  """
5

6
  use Cadet, :model
7

8
  alias Cadet.Accounts.User
9
  alias Cadet.Devices.Device
10

11
  @type t :: %__MODULE__{}
12

13
  schema "device_registrations" do
6✔
14
    field(:title, :string)
15

16
    belongs_to(:user, User)
17
    belongs_to(:device, Device)
18

19
    timestamps()
20
  end
21

22
  @required_fields ~w(title user_id device_id)a
23

24
  def changeset(device, params \\ %{}) do
25
    device
26
    |> cast(params, @required_fields)
UNCOV
27
    |> validate_required(@required_fields)
×
28
  end
29
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