~cosmicrose/liberator

liberator/test/liberator/http_datetime_test.exs -rw-r--r-- 481 bytes
95bf1d41Rosa Richter Credo fixes 2 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# SPDX-FileCopyrightText: 2021 Rosa Richter
#
# SPDX-License-Identifier: MIT

defmodule Liberator.HTTPDateTimeTest do
  use ExUnit.Case, async: true
  doctest Liberator.HTTPDateTime

  describe "parse!/1" do
    test "raises on error" do
      assert_raise Timex.Parse.ParseError,
                   "Expected `weekday abbreviation` at line 1, column 1.",
                   fn ->
                     Liberator.HTTPDateTime.parse!("asdf")
                   end
    end
  end
end