]> git.openstreetmap.org Git - rails.git/blobdiff - test/system/note_layer_test.rb
Merge remote-tracking branch 'upstream/pull/5765'
[rails.git] / test / system / note_layer_test.rb
index 792c3416d61e433735c64ee0b81be6b2cd3e5165..ae940320375c56649baca3666842063f9f39a250 100644 (file)
@@ -4,7 +4,7 @@ class NoteLayerTest < ApplicationSystemTestCase
   test "note marker should have description as a title" do
     position = (1.1 * GeoRecord::SCALE).to_i
     create(:note, :latitude => position, :longitude => position) do |note|
   test "note marker should have description as a title" do
     position = (1.1 * GeoRecord::SCALE).to_i
     create(:note, :latitude => position, :longitude => position) do |note|
-      create(:note_comment, :note => note, :body => "Note description")
+      create(:note_comment, :note => note, :body => "Note description", :event => "opened")
     end
 
     visit root_path(:anchor => "map=18/1.1/1.1&layers=N")
     end
 
     visit root_path(:anchor => "map=18/1.1/1.1&layers=N")
@@ -16,8 +16,8 @@ class NoteLayerTest < ApplicationSystemTestCase
   test "note marker should not have a title if the note has no visible description" do
     position = (1.1 * GeoRecord::SCALE).to_i
     create(:note, :latitude => position, :longitude => position) do |note|
   test "note marker should not have a title if the note has no visible description" do
     position = (1.1 * GeoRecord::SCALE).to_i
     create(:note, :latitude => position, :longitude => position) do |note|
-      create(:note_comment, :note => note, :body => "Note description is hidden", :visible => false)
-      create(:note_comment, :note => note, :body => "Note comment visible", :event => "commented")
+      create(:note_comment, :note => note, :body => "Note description is hidden", :event => "opened", :visible => false)
+      create(:note_comment, :note => note, :body => "Note comment visible")
     end
 
     visit root_path(:anchor => "map=18/1.1/1.1&layers=N")
     end
 
     visit root_path(:anchor => "map=18/1.1/1.1&layers=N")
@@ -29,7 +29,7 @@ class NoteLayerTest < ApplicationSystemTestCase
   test "note marker should not have a title if the note has no visible description and comments" do
     position = (1.1 * GeoRecord::SCALE).to_i
     create(:note, :latitude => position, :longitude => position) do |note|
   test "note marker should not have a title if the note has no visible description and comments" do
     position = (1.1 * GeoRecord::SCALE).to_i
     create(:note, :latitude => position, :longitude => position) do |note|
-      create(:note_comment, :note => note, :body => "Note description is hidden", :visible => false)
+      create(:note_comment, :note => note, :body => "Note description is hidden", :event => "opened", :visible => false)
     end
 
     visit root_path(:anchor => "map=18/1.1/1.1&layers=N")
     end
 
     visit root_path(:anchor => "map=18/1.1/1.1&layers=N")