From 5dee66fbfccbb5770ae463b6fa6ac152a8cb41a1 Mon Sep 17 00:00:00 2001 From: Yohei Yasukawa Date: Thu, 18 Dec 2025 15:29:09 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=92=20=E3=83=86=E3=82=B9=E3=83=88?= =?UTF-8?q?=E3=83=87=E3=83=BC=E3=82=BF=E3=81=AE=E3=83=89=E3=83=A1=E3=82=A4?= =?UTF-8?q?=E3=83=B3=E3=82=92=20example.com/org/net=20=E3=81=AB=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 不適切なテストデータの修正: - dojo1.com, dojo2.com などの実在する可能性のあるドメインを使用していた - RFC 2606 で定められた予約済みドメインに変更 - example.com, example.org, example.net を使用 - メールアドレスも同様に修正(info@dojo1.example.com など) これらのドメインは IANA によって文書やテスト目的で予約されており、 実際のインターネット上で使用されることはありません。 参考: https://www.iana.org/domains/reserved --- spec/lib/statistics/aggregation_spec.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/spec/lib/statistics/aggregation_spec.rb b/spec/lib/statistics/aggregation_spec.rb index 70627275e..ebc4c6dbe 100644 --- a/spec/lib/statistics/aggregation_spec.rb +++ b/spec/lib/statistics/aggregation_spec.rb @@ -17,12 +17,12 @@ let(:yaml_provider) { instance_double(EventService::Providers::StaticYaml) } before do - d1 = create(:dojo, name: 'Dojo1', email: 'info@dojo1.com', description: 'CoderDojo1', tags: %w(CoderDojo1), url: 'https://dojo1.com', prefecture_id: 13) - d2 = create(:dojo, name: 'Dojo2', email: 'info@dojo2.com', description: 'CoderDojo2', tags: %w(CoderDojo2), url: 'https://dojo2.com', prefecture_id: 13) + d1 = create(:dojo, name: 'Dojo1', email: 'info@dojo1.example.com', description: 'CoderDojo1', tags: %w(CoderDojo1), url: 'https://example.com/dojo1', prefecture_id: 13) + d2 = create(:dojo, name: 'Dojo2', email: 'info@dojo2.example.com', description: 'CoderDojo2', tags: %w(CoderDojo2), url: 'https://example.org/dojo2', prefecture_id: 13) create(:dojo_event_service, dojo_id: d1.id, name: :connpass, group_id: 9876) create(:dojo_event_service, dojo_id: d2.id, name: :doorkeeper, group_id: 5555) - create(:dojo, id: 194, name: 'Dojo194', email: 'info@dojo194.com', description: 'CoderDojo194', tags: %w(CoderDojo194), url: 'https://dojo194.com', prefecture_id: 13) + create(:dojo, id: 194, name: 'Dojo194', email: 'info@dojo194.example.com', description: 'CoderDojo194', tags: %w(CoderDojo194), url: 'https://example.com/dojo194', prefecture_id: 13) allow(EventService::Providers::StaticYaml).to receive(:new).and_return(yaml_provider) allow(yaml_provider).to receive(:fetch_events).and_return([ { 'dojo_id' => 194, 'event_url' => 'https://example.com/event/12345', 'evented_at' => '2023-12-10 14:00', 'participants' => 1 } @@ -153,10 +153,10 @@ context 'find_dojos_by(services)' do before :each do - @d1 = create(:dojo, name: 'Dojo1', email: 'info@dojo1.com', description: 'CoderDojo1', tags: %w(CoderDojo1), url: 'https://dojo1.com', prefecture_id: 13) - @d2 = create(:dojo, name: 'Dojo2', email: 'info@dojo2.com', description: 'CoderDojo2', tags: %w(CoderDojo2), url: 'https://dojo2.com', prefecture_id: 13) - @d3 = create(:dojo, name: 'Dojo3', email: 'info@dojo3.com', description: 'CoderDojo3', tags: %w(CoderDojo3), url: 'https://dojo3.com', prefecture_id: 13) - @d4 = create(:dojo, name: 'Dojo4', email: 'info@dojo4.com', description: 'CoderDojo4', tags: %w(CoderDojo4), url: 'https://dojo4.com', prefecture_id: 13) + @d1 = create(:dojo, name: 'Dojo1', email: 'info@dojo1.example.com', description: 'CoderDojo1', tags: %w(CoderDojo1), url: 'https://example.com/dojo1', prefecture_id: 13) + @d2 = create(:dojo, name: 'Dojo2', email: 'info@dojo2.example.com', description: 'CoderDojo2', tags: %w(CoderDojo2), url: 'https://example.org/dojo2', prefecture_id: 13) + @d3 = create(:dojo, name: 'Dojo3', email: 'info@dojo3.example.com', description: 'CoderDojo3', tags: %w(CoderDojo3), url: 'https://example.net/dojo3', prefecture_id: 13) + @d4 = create(:dojo, name: 'Dojo4', email: 'info@dojo4.example.com', description: 'CoderDojo4', tags: %w(CoderDojo4), url: 'https://example.com/dojo4', prefecture_id: 13) create(:dojo_event_service, dojo_id: @d1.id, name: :connpass, group_id: 9876) create(:dojo_event_service, dojo_id: @d2.id, name: :doorkeeper, group_id: 5555) create(:dojo_event_service, dojo_id: @d2.id, name: :connpass, group_id: 9877)