Commit 6101c2d4 authored by Tugce Nur Tas's avatar Tugce Nur Tas Committed by Tuğçe Nur Taş
Browse files

adapt tests for soft deletion

parent be4fcd8f
......@@ -4,7 +4,7 @@ class UsersTest < ApplicationSystemTestCase
setup do
@emails = ActionMailer::Base.deliveries
@user = create :user, email: ''
@user = create :user, email: '', role: 'superadmin'
login_as @user
visit new_user_path
......@@ -64,4 +64,12 @@ class UsersTest < ApplicationSystemTestCase
email = ActionMailer::Base.deliveries.last
assert_equal '', email['to'].to_s
test 'superadmins have no destroy link' do
visit users_path
@social_worker = create :user, role: 'social_worker'
@department_manager = create :user, role: 'department_manager'
assert_not page.has_link? 'Delete'
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment