@@ -36,33 +36,33 @@ def add_playing_time(user, duration)
3636 guilty = create ( :user )
3737 create ( :kick , punished : guilty )
3838
39- assert_equal ( Type ::BAN , 7 . days ) , Punishment . calculate_next_game ( guilty )
39+ assert_equal [ Punishment :: Type ::BAN , 7 . days ] , Punishment . calculate_next_game ( guilty )
4040
4141 create ( :ban , punished : guilty )
4242
43- assert_equal ( Type ::BAN , nil ) , Punishment . calculate_next_game ( guilty )
43+ assert_equal [ Punishment :: Type ::BAN , nil ] , Punishment . calculate_next_game ( guilty )
4444 end
4545
4646 test "forum punish sequence" do
4747 guilty = create ( :user )
4848
49- assert_equal ( Type ::FORUM_WARN , nil ) , Punishment . calculate_next_forum ( guilty )
49+ assert_equal [ Punishment :: Type ::FORUM_WARN , nil ] , Punishment . calculate_next_forum ( guilty )
5050
5151 create ( :forum_warn , punished : guilty )
5252
53- assert_equal ( Type ::FORUM_WARN , nil ) , Punishment . calculate_next_forum ( guilty )
53+ assert_equal [ Punishment :: Type ::FORUM_WARN , nil ] , Punishment . calculate_next_forum ( guilty )
5454
5555 create ( :forum_warn , punished : guilty )
5656
57- assert_equal ( Type ::FORUM_BAN , 7 . days ) , Punishment . calculate_next_forum ( guilty )
57+ assert_equal [ Punishment :: Type ::FORUM_BAN , 7 . days ] , Punishment . calculate_next_forum ( guilty )
5858
5959 create ( :forum_ban , punished : guilty )
6060
61- assert_equal ( Type ::FORUM_BAN , 30 . days ) , Punishment . calculate_next_forum ( guilty )
61+ assert_equal [ Punishment :: Type ::FORUM_BAN , 30 . days ] , Punishment . calculate_next_forum ( guilty )
6262
6363 create ( :forum_ban , punished : guilty )
6464
65- assert_equal ( Type ::FORUM_BAN , nil ) , Punishment . calculate_next_forum ( guilty )
65+ assert_equal [ Punishment :: Type ::FORUM_BAN , nil ] , Punishment . calculate_next_forum ( guilty )
6666 end
6767
6868 test "punish sequence stale" do
@@ -71,11 +71,11 @@ def add_playing_time(user, duration)
7171
7272 create ( :kick , punished : guilty )
7373
74- assert_equal ( Type ::BAN , 7 . days ) , Punishment . calculate_next_game ( guilty )
74+ assert_equal [ Punishment :: Type ::BAN , 7 . days ] , Punishment . calculate_next_game ( guilty )
7575
7676 Timecop . freeze Punishment ::STALE_REAL_TIME + 1 . day do
7777 add_playing_time guilty , ( Punishment ::STALE_PLAY_TIME + 1 . second )
78- assert_equal ( Type ::KICK , nil ) , Punishment . calculate_next_game ( guilty )
78+ assert_equal [ Punishment :: Type ::KICK , nil ] , Punishment . calculate_next_game ( guilty )
7979 end
8080 end
8181 end
@@ -87,10 +87,10 @@ def add_playing_time(user, duration)
8787 create ( :forum_warn , punished : guilty )
8888 create ( :forum_warn , punished : guilty )
8989
90- assert_equal ( Type ::FORUM_BAN , 7 . days ) , Punishment . calculate_next_forum ( guilty )
90+ assert_equal [ Punishment :: Type ::FORUM_BAN , 7 . days ] , Punishment . calculate_next_forum ( guilty )
9191
9292 Timecop . freeze Punishment ::FORUM_STALE_TIME + 1 . day do
93- assert_equal ( Type ::FORUM_WARN , nil ) , Punishment . calculate_next_forum ( guilty )
93+ assert_equal [ Punishment :: Type ::FORUM_WARN , nil ] , Punishment . calculate_next_forum ( guilty )
9494 end
9595 end
9696 end
0 commit comments