2022-02-09から1日間の記事一覧
モデルテストで日時をテストするときに、以下のように今日作成されたものかどうかを確認するテストを作成していた。 report = Report.create(title: 'test_title', content: 'test_content') assert_match Time.zone.today.to_s, report.created_at.to_date.…
モデルテストで日時をテストするときに、以下のように今日作成されたものかどうかを確認するテストを作成していた。 report = Report.create(title: 'test_title', content: 'test_content') assert_match Time.zone.today.to_s, report.created_at.to_date.…