cirandas.net

ref: master

test/unit/chat_helper_test.rb


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
require_relative "../test_helper"

class ChatHelperTest < ActionView::TestCase

  include ApplicationHelper
  include ChatHelper

  should 'provide menu to change chat presence status' do
    env = Environment.default
    stubs(:environment).returns(env)
    stubs(:profile).returns(nil)
    stubs(:user).returns(create_user('testing').person)
    links = user_status_menu('fake-class', 'offline')
    assert_match /Online/, links
    assert_match /Busy/, links
    assert_match /Sign out of chat/, links
  end

  protected

  include NoosferoTestHelper

end