def setup
# Create the default language for diary entries
create(:language, :code => "en")
+ # Stub nominatim response for diary entry locations
+ stub_request(:get, %r{^http://nominatim\.openstreetmap\.org/reverse\?})
+ .to_return(:status => 404)
end
##
assert_response :not_found, "Should not be able to get a deleted users diary RSS"
end
+ def test_rss_character_escaping
+ create(:diary_entry, :title => "<script>")
+ get :rss, :format => :rss
+
+ assert_match "<title><script></title>", response.body
+ end
+
def test_view
# Try a normal entry that should work
diary_entry = create(:diary_entry, :user => users(:normal_user))