Commit ef9223d051893b9dbb3cb9114604ff8182a87867
Exists in
master
and in
27 other branches
Merge remote-tracking branch 'origin/master'
Showing
2 changed files
with
3 additions
and
16 deletions
Show diff stats
test/unit/application_helper_test.rb
... | ... | @@ -636,21 +636,6 @@ class ApplicationHelperTest < ActionView::TestCase |
636 | 636 | assert_equal '/designs/themes/new-theme/favicon.ico', theme_favicon |
637 | 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 | 639 | should 'not inlude administration link if user is not an environment administrator' do |
655 | 640 | user = mock() |
656 | 641 | stubs(:environment).returns(Environment.default) | ... | ... |
test/unit/chat_helper_test.rb
1 | 1 | require_relative "../test_helper" |
2 | 2 | |
3 | -class ChatHelperTest < ActiveSupport::TestCase | |
3 | +class ChatHelperTest < ActionView::TestCase | |
4 | 4 | |
5 | + include ApplicationHelper | |
5 | 6 | include ChatHelper |
6 | 7 | |
7 | 8 | should 'provide menu to change chat presence status' do |
8 | 9 | env = Environment.default |
9 | 10 | stubs(:environment).returns(env) |
11 | + stubs(:profile).returns(nil) | |
10 | 12 | stubs(:user).returns(create_user('testing').person) |
11 | 13 | links = user_status_menu('fake-class', 'offline') |
12 | 14 | assert_match /Online/, links | ... | ... |