Add spec scenario for current user trying to remove himself from administrators list

This commit is contained in:
Bertocq
2017-05-25 11:28:36 +02:00
parent 7cc1745a29
commit e9ea72113b

View File

@@ -33,5 +33,13 @@ feature 'Admin administrators' do
expect(page).to_not have_content @administrator.name expect(page).to_not have_content @administrator.name
end end
end end
scenario 'Delete Administrator when its the current user' do
find(:xpath, "//tr[contains(.,'#{@admin.name}')]/td/a", text: 'Delete').click
within("#error") do
expect(page).to have_content I18n.t("admin.administrators.administrator.restricted_removal")
end
end
end end