Commit f6f306c510141dfe5cd03c0ffb0b7b27dbe7139e
1 parent
ed065de8
Exists in
master
and in
14 other branches
people_block: remove redundant distinct from with_role scope
Showing
2 changed files
with
9 additions
and
1 deletions
Show diff stats
plugins/people_block/lib/ext/person.rb
plugins/people_block/test/unit/members_block_test.rb
... | ... | @@ -240,6 +240,10 @@ class MembersBlockTest < ActionView::TestCase |
240 | 240 | |
241 | 241 | assert_includes profiles, profile1 |
242 | 242 | assert_not_includes profiles, profile2 |
243 | + | |
244 | + profile_list = block.profile_list | |
245 | + assert_includes profile_list, profile1 | |
246 | + assert_not_includes profile_list, profile2 | |
243 | 247 | end |
244 | 248 | |
245 | 249 | should 'list only profiles with member role' do |
... | ... | @@ -261,6 +265,10 @@ class MembersBlockTest < ActionView::TestCase |
261 | 265 | |
262 | 266 | assert_not_includes profiles, profile1 |
263 | 267 | assert_includes profiles, profile2 |
268 | + | |
269 | + profile_list = block.profile_list | |
270 | + assert_not_includes profile_list, profile1 | |
271 | + assert_includes profile_list, profile2 | |
264 | 272 | end |
265 | 273 | |
266 | 274 | should 'list available roles' do | ... | ... |