From 16b7905dac118a3ae33930f3fb94147e2d63f5b4 Mon Sep 17 00:00:00 2001 From: Saki-htr Date: Sun, 17 Apr 2022 12:23:52 +0900 Subject: [PATCH] =?UTF-8?q?=E7=AE=A1=E7=90=86=E8=80=85=E4=BB=A5=E5=A4=96?= =?UTF-8?q?=E3=81=AE=E4=B8=80=E8=88=AC=E3=83=A6=E3=83=BC=E3=82=B6=E3=83=BC?= =?UTF-8?q?=E3=81=AF=E3=80=81=E3=83=A6=E3=83=BC=E3=82=B6=E3=83=BC=E3=81=AE?= =?UTF-8?q?=E3=82=B3=E3=83=BC=E3=82=B9=E3=82=92=E5=A4=89=E6=9B=B4=E3=81=A7?= =?UTF-8?q?=E3=81=8D=E3=81=AA=E3=81=84=E3=83=86=E3=82=B9=E3=83=88=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/system/admin/users_test.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/system/admin/users_test.rb b/test/system/admin/users_test.rb index 6dcdba2eb6e..c52542d7581 100644 --- a/test/system/admin/users_test.rb +++ b/test/system/admin/users_test.rb @@ -226,4 +226,11 @@ class Admin::UsersTest < ApplicationSystemTestCase click_on '更新する' assert_equal 'iOSプログラマー', user.reload.course.title end + + test 'general user cannot change user course' do + user = users(:kensyu) + visit_with_auth "/admin/users/#{user.id}/edit", 'kimura' + assert_current_path('/') + assert_text '管理者としてログインしてください' + end end