- assert_select "a[href^='/user/moderator/history']", 1
- assert_select "a[href='/user/moderator/traces']", 1
- assert_select "a[href='/user/moderator/diary']", 1
- assert_select "a[href='/user/moderator/diary/comments']", 1
- assert_select "a[href='/user/moderator/account']", 0
- assert_select "a[href='/user/moderator/blocks']", 0
- assert_select "a[href='/user/moderator/blocks_by']", 1
- assert_select "a[href='/blocks/new/moderator']", 0
+ assert_select "a[href^='/user/#{URI.encode(moderator_user.display_name)}/history']", 1
+ assert_select "a[href='/user/#{URI.encode(moderator_user.display_name)}/traces']", 1
+ assert_select "a[href='/user/#{URI.encode(moderator_user.display_name)}/diary']", 1
+ assert_select "a[href='/user/#{URI.encode(moderator_user.display_name)}/diary/comments']", 1
+ assert_select "a[href='/user/#{URI.encode(moderator_user.display_name)}/account']", 0
+ assert_select "a[href='/user/#{URI.encode(moderator_user.display_name)}/blocks']", 0
+ assert_select "a[href='/user/#{URI.encode(moderator_user.display_name)}/blocks_by']", 1
+ assert_select "a[href='/blocks/new/#{URI.encode(moderator_user.display_name)}']", 0