Commit c717cb2c67b0cc86dca6c51a7e5bb0a51d08bd21

Authored by Rodrigo Souto
1 parent 0ed26129

chat: use ActionView::TestCase and include ApplicationHelper on ChatHelper test

Showing 1 changed file with 3 additions and 1 deletions   Show diff stats
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