diff --git a/app/views/admin/moderators/index.html.erb b/app/views/admin/moderators/index.html.erb
index cf3855d05..52b1b32e2 100644
--- a/app/views/admin/moderators/index.html.erb
+++ b/app/views/admin/moderators/index.html.erb
@@ -13,7 +13,7 @@
<%= page_entries_info @moderators %>
-
+
<% @moderators.each do |moderator| %>
-
<%= render 'moderator', moderator: moderator %>
diff --git a/spec/features/admin/moderators_spec.rb b/spec/features/admin/moderators_spec.rb
index bdbd23b05..d190e75a0 100644
--- a/spec/features/admin/moderators_spec.rb
+++ b/spec/features/admin/moderators_spec.rb
@@ -22,15 +22,18 @@ feature 'Admin moderators' do
expect(page).to have_content @user.name
click_link 'Add'
-
- expect(page).to have_content @user.name
+ within("#moderators") do
+ expect(page).to have_content @user.name
+ end
end
scenario 'Delete Moderator' do
visit admin_moderators_path
click_link 'Delete'
- expect(page).to_not have_content @moderator.name
+ within("#moderators") do
+ expect(page).to_not have_content @moderator.name
+ end
end
end