]> git.openstreetmap.org Git - rails.git/blob - test/system/index_test.rb
bb23cee60180aed99fbe388898735c80078dc099
[rails.git] / test / system / index_test.rb
1 require "application_system_test_case"
2
3 class IndexTest < ApplicationSystemTestCase
4   test "node included in edit link" do
5     node = create(:node)
6     visit node_path(node)
7     assert_selector "#editanchor[href*='?node=#{node.id}#']"
8
9     find("#sidebar .btn-close").click
10     assert_no_selector "#editanchor[href*='?node=#{node.id}#']"
11   end
12
13   test "note included in edit link" do
14     note = create(:note_with_comments)
15     visit browse_note_path(note)
16     assert_selector "#editanchor[href*='?note=#{note.id}#']"
17
18     find("#sidebar .btn-close").click
19     assert_no_selector "#editanchor[href*='?note=#{note.id}#']"
20   end
21 end