Changed the bidding round status field from "running" to "stopped".

This commit is contained in:
2026-02-12 11:00:14 +01:00
parent 647da6c9d7
commit e01042130e
6 changed files with 43 additions and 20 deletions

View File

@ -5,14 +5,14 @@ defmodule BeetRoundServerWeb.BiddingRoundControllerTest do
alias BeetRoundServer.BiddingRounds.BiddingRound
@create_attrs %{
running: true,
stopped: true,
round_number: 42
}
@update_attrs %{
running: false,
stopped: false,
round_number: 43
}
@invalid_attrs %{running: nil, round_number: nil}
@invalid_attrs %{stopped: nil, round_number: nil}
setup %{conn: conn} do
{:ok, conn: put_req_header(conn, "accept", "application/json")}
@ -35,7 +35,7 @@ defmodule BeetRoundServerWeb.BiddingRoundControllerTest do
assert %{
"id" => ^id,
"round_number" => 42,
"running" => true
"stopped" => true
} = json_response(conn, 200)["data"]
end
@ -48,7 +48,10 @@ defmodule BeetRoundServerWeb.BiddingRoundControllerTest do
describe "update bidding_round" do
setup [:create_bidding_round]
test "renders bidding_round when data is valid", %{conn: conn, bidding_round: %BiddingRound{id: id} = bidding_round} do
test "renders bidding_round when data is valid", %{
conn: conn,
bidding_round: %BiddingRound{id: id} = bidding_round
} do
conn = put(conn, ~p"/api/bidding_rounds/#{bidding_round}", bidding_round: @update_attrs)
assert %{"id" => ^id} = json_response(conn, 200)["data"]
@ -57,7 +60,7 @@ defmodule BeetRoundServerWeb.BiddingRoundControllerTest do
assert %{
"id" => ^id,
"round_number" => 43,
"running" => false
"stopped" => false
} = json_response(conn, 200)["data"]
end