Skip to content

Commit a610430

Browse files
authored
docs: Add code blocks/syntax highlighting for examples in AshJsonApi.Test (#274)
1 parent 5db888d commit a610430

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/ash_json_api/test/test.ex

+6-2
Original file line numberDiff line numberDiff line change
@@ -408,8 +408,8 @@ defmodule AshJsonApi.Test do
408408
has the same value in the error.
409409
410410
## Example
411-
412-
```elixr
411+
412+
```elixir
413413
Domain
414414
|> delete("/posts/1", status: 404)
415415
|> assert_has_error(%{
@@ -438,6 +438,7 @@ defmodule AshJsonApi.Test do
438438
439439
## Example
440440
441+
```elixir
441442
Domain
442443
|> get("/posts/\#{post.id}/?include=author", status: 200)
443444
|> assert_has_matching_include(fn
@@ -447,6 +448,7 @@ defmodule AshJsonApi.Test do
447448
_ ->
448449
false
449450
end)
451+
```
450452
"""
451453
defmacro assert_has_matching_include(conn, function) do
452454
quote do
@@ -466,6 +468,7 @@ defmodule AshJsonApi.Test do
466468
467469
## Example
468470
471+
```elixir
469472
Domain
470473
|> get("/posts/\#{post.id}/?include=author", status: 200)
471474
|> refute_has_matching_include(fn
@@ -475,6 +478,7 @@ defmodule AshJsonApi.Test do
475478
_ ->
476479
false
477480
end)
481+
```
478482
"""
479483
defmacro refute_has_matching_include(conn, function) do
480484
quote do

0 commit comments

Comments
 (0)