assert_equal "commented", js["properties"]["comments"].last["action"]
assert_equal "This is an additional comment", js["properties"]["comments"].last["text"]
assert_equal third_user.display_name, js["properties"]["comments"].last["user"]
-
- ActionMailer::Base.deliveries.clear
end
def test_comment_with_notifications_success
second_user = create(:user)
third_user = create(:user)
- note_with_comments_by_users = create(:note) do |note|
+ note_with_comments_by_users = create(:note, :author => first_user) do |note|
create(:note_comment, :note => note, :author => first_user)
create(:note_comment, :note => note, :author => second_user)
end
assert_equal "commented", js["properties"]["comments"].last["action"]
assert_equal "This is an additional comment", js["properties"]["comments"].last["text"]
assert_equal third_user.display_name, js["properties"]["comments"].last["user"]
-
- ActionMailer::Base.deliveries.clear
end
def test_comment_twice_success
assert_select "gpx", :count => 1 do
assert_select "wpt", :count => 1
end
+
+ user2 = create(:user)
+ get search_api_notes_path(:user => user2.id, :format => "xml")
+ assert_response :success
+ assert_equal "application/xml", @response.media_type
+ assert_select "osm", :count => 1 do
+ assert_select "note", :count => 0
+ end
end
def test_search_by_time_success