5 def check_user_blocks_table(user_blocks)
6 assert_dom "table#block_list tbody tr" do |rows|
7 assert_equal user_blocks.count, rows.count, "unexpected number of rows in user blocks table"
8 rows.zip(user_blocks).map do |row, user_block|
9 assert_dom row, "a[href='#{user_block_path user_block}']", 1
14 def check_no_page_link(name)
15 assert_select "a.page-link", { :text => /#{Regexp.quote(name)}/, :count => 0 }, "unexpected #{name} page link"
18 def check_page_link(name)
19 assert_select "a.page-link", { :text => /#{Regexp.quote(name)}/ }, "missing #{name} page link" do |buttons|
20 return buttons.first.attributes["href"].value