From 42dbbb5e1ebba52998aba7dfd82ef62f4bb2f7d5 Mon Sep 17 00:00:00 2001 From: zafer Date: Thu, 22 Aug 2024 23:51:10 +0300 Subject: [PATCH] update test cases --- test/algora/ads_test.exs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/algora/ads_test.exs b/test/algora/ads_test.exs index 8942dc7..9b2ebea 100644 --- a/test/algora/ads_test.exs +++ b/test/algora/ads_test.exs @@ -4,18 +4,18 @@ defmodule Algora.AdsTest do alias Algora.Ads describe "next_slot/1" do - test "returns the next 10-minute slot" do + test "returns the next 30-minute slot" do # Test case 1: Exactly at the start of a slot time = ~U[2024-08-03 10:00:00.000Z] - assert Ads.next_slot(time) == ~U[2024-08-03 10:10:00.000Z] + assert Ads.next_slot(time) == ~U[2024-08-03 10:30:00.000Z] # Test case 2: In the middle of a slot - time = ~U[2024-08-03 10:05:30.123Z] - assert Ads.next_slot(time) == ~U[2024-08-03 10:10:00.000Z] + time = ~U[2024-08-03 10:15:30.123Z] + assert Ads.next_slot(time) == ~U[2024-08-03 10:30:00.000Z] # Test case 3: Just before the next slot - time = ~U[2024-08-03 10:09:59.999Z] - assert Ads.next_slot(time) == ~U[2024-08-03 10:10:00.000Z] + time = ~U[2024-08-03 10:29:59.999Z] + assert Ads.next_slot(time) == ~U[2024-08-03 10:30:00.000Z] # Test case 4: Crossing an hour boundary time = ~U[2024-08-03 10:55:00.123Z]