Commit ef9223d051893b9dbb3cb9114604ff8182a87867

Authored by Weblate
2 parents bb2d88cf c717cb2c

Merge remote-tracking branch 'origin/master'

test/unit/application_helper_test.rb
@@ -636,21 +636,6 @@ class ApplicationHelperTest < ActionView::TestCase @@ -636,21 +636,6 @@ class ApplicationHelperTest < ActionView::TestCase
636 assert_equal '/designs/themes/new-theme/favicon.ico', theme_favicon 636 assert_equal '/designs/themes/new-theme/favicon.ico', theme_favicon
637 end 637 end
638 638
639 - should 'include item in usermenu for environment enabled features' do  
640 - env = fast_create(Environment)  
641 - env.enable('xmpp_chat', false)  
642 - stubs(:environment).returns(env)  
643 -  
644 - @controller = ApplicationController.new  
645 - path = Rails.root.join('app', 'views')  
646 - @controller.stubs(:view_paths).returns([path])  
647 -  
648 - file = path.join('shared','usermenu', 'xmpp_chat.html.erb')  
649 - expects(:render).with(:file => file, :use_full_path => false).returns('Open chat')  
650 -  
651 - assert_equal 'Open chat', render_environment_features(:usermenu)  
652 - end  
653 -  
654 should 'not inlude administration link if user is not an environment administrator' do 639 should 'not inlude administration link if user is not an environment administrator' do
655 user = mock() 640 user = mock()
656 stubs(:environment).returns(Environment.default) 641 stubs(:environment).returns(Environment.default)
test/unit/chat_helper_test.rb
1 require_relative "../test_helper" 1 require_relative "../test_helper"
2 2
3 -class ChatHelperTest < ActiveSupport::TestCase 3 +class ChatHelperTest < ActionView::TestCase
4 4
  5 + include ApplicationHelper
5 include ChatHelper 6 include ChatHelper
6 7
7 should 'provide menu to change chat presence status' do 8 should 'provide menu to change chat presence status' do
8 env = Environment.default 9 env = Environment.default
9 stubs(:environment).returns(env) 10 stubs(:environment).returns(env)
  11 + stubs(:profile).returns(nil)
10 stubs(:user).returns(create_user('testing').person) 12 stubs(:user).returns(create_user('testing').person)
11 links = user_status_menu('fake-class', 'offline') 13 links = user_status_menu('fake-class', 'offline')
12 assert_match /Online/, links 14 assert_match /Online/, links