Skip to content

Commit

Permalink
add be tests
Browse files Browse the repository at this point in the history
  • Loading branch information
breeg554 committed Nov 19, 2024
1 parent 073e8ed commit 35818cc
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,26 @@ defmodule BuildelWeb.OrganizationPipelineControllerTest do
assert_schema(response, "PipelineIndexResponse", api_spec)
end

test "lists sorted organization pipelines", %{
conn: conn,
organization: organization,
api_spec: api_spec
} do
organization_id = organization.id
pipeline_fixture(%{organization_id: organization_id, name: "BBB"})
fixture = pipeline_fixture(%{organization_id: organization_id, name: "AAA"})
conn = get(conn, ~p"/api/organizations/#{organization_id}/pipelines?sort=name")
response = json_response(conn, 200)

fixture_name = fixture.name

%{
"data" => [%{"name" => ^fixture_name}, _],
} = response

assert_schema(response, "PipelineIndexResponse", api_spec)
end

test "lists organization favorite pipelines", %{
conn: conn,
organization: organization,
Expand Down

0 comments on commit 35818cc

Please sign in to comment.