diff --git a/app/controllers/public/chat_controller.rb b/app/controllers/public/chat_controller.rb
index bd834cb..235b3bd 100644
--- a/app/controllers/public/chat_controller.rb
+++ b/app/controllers/public/chat_controller.rb
@@ -19,7 +19,7 @@ class ChatController < PublicController
def avatar
profile = environment.profiles.find_by_identifier(params[:id])
filename, mimetype = profile_icon(profile, :minor, true)
- data = File.read(Rails.root.join('public', filename))
+ data = File.read(File.join(Rails.root, 'public', filename))
render :text => data, :layout => false, :content_type => mimetype
expires_in 24.hours
end
diff --git a/app/views/layouts/chat.html.erb b/app/views/layouts/chat.html.erb
index 9f32d8d..0874e01 100644
--- a/app/views/layouts/chat.html.erb
+++ b/app/views/layouts/chat.html.erb
@@ -6,8 +6,8 @@
<%= noosfero_javascript %>
- <%= javascript_include_tag 'prototype', 'jquery.scrollabletab', 'strophejs-1.0.1/strophe', 'jquery.emoticon', '/designs/icons/pidgin/emoticons.js', 'ba-linkify', 'jquery.ba-hashchange', 'jquery.sound', 'chat', :cache => 'cache-chat' %>
- <%= stylesheet_link_tag noosfero_stylesheets, :cache => 'cache' %>
+ <%= javascript_include_tag 'prototype', 'jquery.scrollabletab', 'strophejs-1.0.1/strophe', 'jquery.emoticon', '../designs/icons/pidgin/emoticons.js', 'ba-linkify', 'jquery.ba-hashchange', 'jquery.sound', 'chat', :cache => 'cache-chat' %>
+ <%= noosfero_stylesheets %>
<%= stylesheet_link_tag icon_theme_stylesheet_path %>
<%= stylesheet_link_tag theme_stylesheet_path %>
<%= stylesheet_link_tag jquery_ui_theme_stylesheet_path %>
diff --git a/test/functional/chat_controller_test.rb b/test/functional/chat_controller_test.rb
index 05f7d13..8827582 100644
--- a/test/functional/chat_controller_test.rb
+++ b/test/functional/chat_controller_test.rb
@@ -27,7 +27,7 @@ class ChatControllerTest < ActionController::TestCase
get :avatar, :id => 'testuser'
assert_equal 'image/png', @response.content_type
- assert_match /PNG/, @response.body
+ assert @response.body.index('PNG')
end
should 'get avatar from community' do
@@ -37,7 +37,7 @@ class ChatControllerTest < ActionController::TestCase
get :avatar, :id => community.identifier
assert_equal 'image/png', @response.content_type
- assert_match /PNG/, @response.body
+ assert @response.body.index('PNG')
end
should 'auto connect if last presence status is blank' do
--
libgit2 0.21.2