Skip to content

Commit

Permalink
[test]ヘルパーメソッドのテスト追加
Browse files Browse the repository at this point in the history
  • Loading branch information
reckyy committed Mar 8, 2024
1 parent 6e20bfe commit 7d9c3ff
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions test/helpers/users_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,33 @@ class UsersHelperTest < ActionView::TestCase
assert_includes countries['JP'], %w[北海道 01]
assert_includes countries['US'], %w[アラスカ州 AK]
end

test 'roles_for_select returns array for select_tag containing role info' do
user_roles = [
%w[全員 all],
%w[現役生 student_and_trainee],
%w[非アクティブ inactive],
%w[休会 hibernated],
%w[退会 retired],
%w[卒業 graduate],
%w[アドバイザー adviser],
%w[メンター mentor],
%w[研修生 trainee],
%w[忘年会 year_end_party],
%w[お試し延長 campaign]
]
assert roles_for_select, user_roles
end

test 'jobs_for_select returns array for select_tag containing job info' do
user_jobs = [
%w[全員 all],
%w[学生 student],
%w[会社員 office_worker],
%w[フリーター part_time_worker],
%w[休職中 vacation],
%w[働いていない unemployed]
]
assert jobs_for_select, user_jobs
end
end

0 comments on commit 7d9c3ff

Please sign in to comment.