Skip to content

Commit

Permalink
無料の表示削除に伴うテスト
Browse files Browse the repository at this point in the history
  • Loading branch information
Judeeeee committed Jul 6, 2024
1 parent dbb7d14 commit 81d6c9a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
6 changes: 6 additions & 0 deletions test/system/admin/users_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -366,4 +366,10 @@ class Admin::UsersTest < ApplicationSystemTestCase
visit_with_auth "/admin/users/#{user.id}/edit", 'komagata'
assert has_checked_field?('user_hide_mentor_profile', visible: false)
end

test 'not display free checkbox on user edit page' do
user = users(:muryou)
visit_with_auth "/admin/users/#{user.id}/edit", 'komagata'
assert_no_selector 'label.a-block-check__label.is-ta-left[for="user_free]', text: '無料'
end
end
11 changes: 0 additions & 11 deletions test/system/current_user_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -128,17 +128,6 @@ class CurrentUserTest < ApplicationSystemTestCase
assert_match user.reload.graduated_on.to_s, '2022-05-01'
end

test 'update admin user\'s free' do
user = users(:komagata)

visit_with_auth '/current_user/edit', 'komagata'
check '無料', allow_label_click: true

click_on '更新する'

assert user.reload.free
end

test 'update admin user\'s github_collaborator' do
user = users(:komagata)

Expand Down
8 changes: 8 additions & 0 deletions test/system/mentor_mode_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,12 @@ class MentorModeTest < ApplicationSystemTestCase
visit_with_auth user_path(users(:hatsuno)), 'kimura'
assert_no_text 'ユーザーメモ'
end

test 'not display user billing status is free' do
user = users(:muryou)
visit_with_auth "/users/#{user.id}/", 'mentormentaro'
within('.user-metas.is-only-mentor') do
assert_no_text '無料'
end
end
end

0 comments on commit 81d6c9a

Please sign in to comment.