1 require "application_system_test_case"
3 class UserNotesTest < ApplicationSystemTestCase
4 test "boundary condition when next page link activates" do
7 create(:note, :author => user, :description => "Note '#{x}'") do |note|
8 create(:note_comment, :event => "opened", :note => note, :author => user, :body => "Note '#{x}'")
12 visit user_notes_path(user)
14 within_content_body do
15 assert_text "Note 'J'"
16 assert_text "Note 'A'"
17 assert_no_link "Previous"
21 ("K".."K").each do |x|
22 create(:note, :author => user, :description => "Note '#{x}'") do |note|
23 create(:note_comment, :event => "opened", :note => note, :author => user, :body => "Note '#{x}'")
27 visit user_notes_path(user)
29 within_content_body do
30 assert_text "Note 'K'"
31 assert_text "Note 'B'"
32 assert_no_text "Note 'A'"
33 assert_no_link "Previous"
36 click_on "Next", :match => :first
38 assert_no_text "Note 'K'"
39 assert_no_text "Note 'B'"
40 assert_text "Note 'A'"
41 assert_link "Previous"