Skip to content

Commit

Permalink
test: 💍 Spec を追加した (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikukyugamer authored Jul 27, 2023
1 parent bf0889c commit a4fcc46
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
File renamed without changes.
24 changes: 24 additions & 0 deletions spec/models/gss/character_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,28 @@
expect(Gss::Character.where(name: 'ナッシュ・ラトキエ(ナッシュ・クロービス)')).to be_present
end
end

describe 'キャラが作品に属する' do
it 'ルック が 幻水I, II and III に属すること' do
character = Gss::Character.find_by(name: 'ルック')

expect(character.product_titles.map(&:name)).to match_array %w[
幻想水滸伝
幻想水滸伝II
幻想水滸伝III
]
end

it 'ハーン・カニンガム が 幻水II に属すること' do
character = Gss::Character.find_by(name: 'ハーン・カニンガム')

expect(character.product_titles.map(&:name)).to match_array %w[幻想水滸伝II]
end

it 'コノン が 幻想水滸伝ティアクライス に属すること' do
character = Gss::Character.find_by(name: 'コノン')

expect(character.product_titles.map(&:name)).to match_array %w[幻想水滸伝ティアクライス]
end
end
end

0 comments on commit a4fcc46

Please sign in to comment.