Skip to content

Commit f9d5f69

Browse files
committed
Try and debug intermittent failure
Relating to unverified user's resources potentially not appearing in order. #719
1 parent 0cc1ef3 commit f9d5f69

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

test/controllers/curator_controller_test.rb

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,6 @@ class CuratorControllerTest < ActionController::TestCase
124124
sign_in users(:admin)
125125
new_user = users(:unverified_user)
126126

127-
get :users, params: { with_content: true }
128-
129-
assert_response :success
130-
assert_not_includes assigns(:users), new_user
131-
132127
event = nil
133128
material = nil
134129
workflow = nil
@@ -178,6 +173,8 @@ class CuratorControllerTest < ActionController::TestCase
178173
get :users, params: { with_content: true }
179174

180175
assert_response :success
176+
assert_includes assigns(:users), new_user
177+
assert_select '.panel-heading a[href=?]', @controller.user_path(new_user), text: new_user.username
181178

182179
User::CREATED_RESOURCE_TYPES.each do |type|
183180
klass = type.to_s.classify.constantize
@@ -188,7 +185,7 @@ class CuratorControllerTest < ActionController::TestCase
188185
end
189186

190187
[event, material, workflow, collection, provider, source].each do |resource|
191-
assert_select '.curate-user a[href=?]', @controller.polymorphic_path(resource)
188+
assert_select '.curate-user a[href=?]', @controller.polymorphic_path(resource), "#{@controller.polymorphic_path(resource)} not found!, \nBody:\n#{response.body}"
192189
end
193190
end
194191

0 commit comments

Comments
 (0)