From fa7b6cbe3c2c4f6e87f4ee6299592fba73ce16b9 Mon Sep 17 00:00:00 2001 From: reckyy Date: Tue, 16 Jul 2024 11:46:38 +0900 Subject: [PATCH] =?UTF-8?q?=E4=B8=8D=E8=A6=81=E3=81=AA=E3=83=86=E3=82=B9?= =?UTF-8?q?=E3=83=88=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E3=82=92=E5=89=8A?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit viewcomponentの移行に伴い、CalendarHelperを削除した際に削除し忘れていた --- test/helpers/calendar_helper.rb | 37 --------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 test/helpers/calendar_helper.rb diff --git a/test/helpers/calendar_helper.rb b/test/helpers/calendar_helper.rb deleted file mode 100644 index 361f29a302b..00000000000 --- a/test/helpers/calendar_helper.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -require 'test_helper' - -class CalendarHelperTest < ActionView::TestCase - include CalendarHelper - - def setup - @user = users(:kimura) - @user.created_at = Time.zone.parse('1998-01-19') - @date = Date.current - @emotion = 'happy' - end - test 'prev_month? returns true if month is not oldest month' do - assert prev_month?(@user.created_at + 2.months, @user) - end - - test 'prev_month? returns false if month is not oldest month' do - assert_not prev_month?(@user.created_at - 2.months, @user) - end - - test 'frame_and_background returns is-today if date is today' do - assert_includes frame_and_background(@date, nil), 'is-today' - end - - test 'frame_and_background returns is-happy if emotion is happy' do - assert_includes frame_and_background(@date, @emotion), 'is-happy' - end - - test 'next_month? returns true if month is not latest month' do - assert next_month?(@date - 2.months) - end - - test 'next_month? returns false if month is not latest month' do - assert_not next_month?(@date) - end -end