Commit c717cb2c67b0cc86dca6c51a7e5bb0a51d08bd21
1 parent
0ed26129
Exists in
master
and in
22 other branches
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 | 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 | ... | ... |