Skip to content

Commit

Permalink
Fix flacky test for events
Browse files Browse the repository at this point in the history
  • Loading branch information
alxlion committed Jun 8, 2024
1 parent ad10e0f commit 46504d1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
10 changes: 10 additions & 0 deletions dev.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export $(cat .env | xargs)

args=("$@")

if [ "${args[0]}" == "test" ]; then
mix test
elif [ "${args[0]}" == "start" ]; then
mix phx.server
fi

3 changes: 0 additions & 3 deletions start.sh

This file was deleted.

2 changes: 1 addition & 1 deletion test/support/fixtures/events_fixtures.ex
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ defmodule Claper.EventsFixtures do
attrs
|> Enum.into(%{
name: "some name",
code: "#{Enum.random(1000..2000)}",
code: :crypto.strong_rand_bytes(4) |> Base.url_encode64() |> binary_part(0, 8),
uuid: Ecto.UUID.generate(),
user_id: assoc.user.id,
started_at: NaiveDateTime.utc_now(),
Expand Down

0 comments on commit 46504d1

Please sign in to comment.