Skip to content

Commit

Permalink
avoid cache hits in GraphQL or JSONAPI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
boringcactus committed Dec 12, 2023
1 parent 0c7a2c7 commit 124984c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ defmodule MobileAppBackendWeb.StopControllerTest do

import Test.Support.Helpers

setup do
Routes.Repo.clear_cache()
Stops.Repo.clear_cache()

:ok
end

describe "/jsonapi/stop/place-boyls" do
test "defaults to all fields no includes", %{conn: conn} do
conn = get(conn, ~p"/jsonapi/stop/place-boyls")
Expand Down
7 changes: 7 additions & 0 deletions test/mobile_app_backend_web/schema_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ defmodule MobileAppBackendWeb.SchemaTest do

import Test.Support.Helpers

setup do
Routes.Repo.clear_cache()
Stops.Repo.clear_cache()

:ok
end

@stop_query """
query {
stop(id: "place-boyls") {
Expand Down

0 comments on commit 124984c

Please sign in to comment.