Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: 💍 Spec を追加した #109

Merged
merged 1 commit into from
Jul 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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