mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-02-23 22:37:41 +08:00
18 lines
507 B
Elixir
18 lines
507 B
Elixir
defmodule Livebook.ExploreTest do
|
|
use ExUnit.Case, async: true
|
|
|
|
alias Livebook.Notebook
|
|
alias Livebook.Notebook.Explore
|
|
|
|
describe "notebook_by_slug!/1" do
|
|
test "returns notebook structure and images if found" do
|
|
assert {%Notebook{}, _imaegs} = Explore.notebook_by_slug!("intro-to-livebook")
|
|
end
|
|
|
|
test "raises an error if no matching notebook if found" do
|
|
assert_raise Explore.NotFoundError, fn ->
|
|
Explore.notebook_by_slug!("invalid-slug")
|
|
end
|
|
end
|
|
end
|
|
end
|