aboutsummaryrefslogtreecommitdiff
path: root/test/models/audio_file_api_test.exs
blob: 2e15a2ebd831ac3351792e891e82ea3576522278 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
defmodule TheTranscriberBackend.AudioFileAPITest do
  use TheTranscriberBackend.ModelCase

  alias TheTranscriberBackend.AudioFileAPI

  @valid_attrs %{
    audio_path: "myfile.mp3",
    audio_name: "MyFile",
    audio_duration: "00:00"

  }
  @invalid_attrs %{}

  test "changeset with valid attributes" do
    changeset = AudioFileAPI.changeset(%AudioFileAPI{}, @valid_attrs)
    assert changeset.valid?
  end

  test "changeset with invalid attributes" do
    changeset = AudioFileAPI.changeset(%AudioFileAPI{}, @invalid_attrs)
    refute changeset.valid?
  end
end