Skip to content

Commit

Permalink
Dataset : supporter les ressources NeTEx sans validation
Browse files Browse the repository at this point in the history
Cette PR introduit le test associé au hotfix #4233.

Follow-up de #4227.
  • Loading branch information
ptitfred committed Sep 30, 2024
1 parent 8680d88 commit eb97d2b
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,19 @@ defmodule TransportWeb.DatasetControllerTest do
assert conn |> html_response(200) =~ "1 erreurs"
end

test "don't show NeTEx number of errors if no validation", %{conn: conn} do
%{id: dataset_id} = insert(:dataset, %{slug: slug = "dataset-slug", aom: build(:aom)})

%{id: resource_id} = insert(:resource, %{dataset_id: dataset_id, format: "NeTEx", url: "url"})

insert(:resource_history, %{resource_id: resource_id})

mock_empty_history_resources()

conn = conn |> get(dataset_path(conn, :details, slug))
refute conn |> html_response(200) =~ "1 erreurs"
end

test "GTFS-RT without validation", %{conn: conn} do
%{id: dataset_id} = insert(:dataset, %{slug: slug = "dataset-slug"})
insert(:resource, %{dataset_id: dataset_id, format: "gtfs-rt", url: "url"})
Expand Down

0 comments on commit eb97d2b

Please sign in to comment.