Skip to content

test/system/user/events_test.rb の fixture が主催イベント表示仕様と矛盾している #9989

Description

@koguchi-e

概要

build_and_test にて以下エラーが発生しました。

Failure:
User::EventsTest#test_does_not_show_events_the_user_is_not_participating_in:
expected not to find text "未来のイベント(未参加)" in "..."

test/system/user/events_test.rb にて、以下の fixture が「未参加イベント」として扱われています。

event34:
title: "未来のイベント(未参加)"
description: "未来のイベント(未参加)"
location: "FJORDオフィス"
capacity: 40
start_at: 2024-03-26 10:00
end_at: 2024-03-26 12:00
open_start_at: 2024-02-26 10:00
open_end_at: 2024-03-26 09:00
user: kimura

現在は「主催イベントも表示する」仕様となっているため、kimura が主催者であるこのイベントは、未参加でもイベント一覧へ表示されます。

そのため、テスト内の以下期待値と fixture の状態が矛盾しているように見えます。

assert_no_text '未来のイベント(未参加)'

動作確認

bin/rails test test/system/user/events_test.rb

修正案

event34user を別ユーザー(例: komagata)へ変更し、「未参加かつ主催でもないイベント」として扱うよう修正する。

スクリーンショット

Image

関連PR

Metadata

Metadata

Assignees

Labels

Type

Fields

No fields configured for Bug.

Projects

Status
完成

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions