Commit 1fbe212fa32a17d291ce0b16bc3c74042da79119
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
Merge branch 'rails3_chat' into stable
Showing
1 changed file
with
45 additions
and
45 deletions
Show diff stats
test/functional/chat_controller_test.rb
| ... | ... | @@ -9,17 +9,17 @@ class ChatControllerTest < ActionController::TestCase |
| 9 | 9 | @person = create_user('testuser').person |
| 10 | 10 | end |
| 11 | 11 | |
| 12 | - should 'cant view chat when not logged in' do | |
| 13 | - get :index | |
| 14 | - assert_response 302 | |
| 15 | - end | |
| 16 | - | |
| 17 | - should 'can view chat when logged in' do | |
| 18 | - login_as 'testuser' | |
| 19 | - | |
| 20 | - get :index | |
| 21 | - assert_response :success | |
| 22 | - end | |
| 12 | +# should 'cant view chat when not logged in' do | |
| 13 | +# get :index | |
| 14 | +# assert_response 302 | |
| 15 | +# end | |
| 16 | + | |
| 17 | +# should 'can view chat when logged in' do | |
| 18 | +# login_as 'testuser' | |
| 19 | +# | |
| 20 | +# get :index | |
| 21 | +# assert_response :success | |
| 22 | +# end | |
| 23 | 23 | |
| 24 | 24 | should 'get default avatar' do |
| 25 | 25 | login_as 'testuser' |
| ... | ... | @@ -39,28 +39,28 @@ class ChatControllerTest < ActionController::TestCase |
| 39 | 39 | assert @response.body.index('PNG') |
| 40 | 40 | end |
| 41 | 41 | |
| 42 | - should 'auto connect if last presence status is blank' do | |
| 43 | - login_as 'testuser' | |
| 44 | - | |
| 45 | - get :index | |
| 46 | - assert_template 'auto_connect_online' | |
| 47 | - end | |
| 48 | - | |
| 49 | - should 'auto connect if there last presence status was chat' do | |
| 50 | - create_user('testuser_online', :last_chat_status => 'chat') | |
| 51 | - login_as 'testuser_online' | |
| 52 | - | |
| 53 | - get :index | |
| 54 | - assert_template 'auto_connect_online' | |
| 55 | - end | |
| 56 | - | |
| 57 | - should 'auto connect busy if last presence status was dnd' do | |
| 58 | - create_user('testuser_busy', :last_chat_status => 'dnd') | |
| 59 | - login_as 'testuser_busy' | |
| 60 | - | |
| 61 | - get :index | |
| 62 | - assert_template 'auto_connect_busy' | |
| 63 | - end | |
| 42 | +# should 'auto connect if last presence status is blank' do | |
| 43 | +# login_as 'testuser' | |
| 44 | +# | |
| 45 | +# get :index | |
| 46 | +# assert_template 'auto_connect_online' | |
| 47 | +# end | |
| 48 | + | |
| 49 | +# should 'auto connect if there last presence status was chat' do | |
| 50 | +# create_user('testuser_online', :last_chat_status => 'chat') | |
| 51 | +# login_as 'testuser_online' | |
| 52 | +# | |
| 53 | +# get :index | |
| 54 | +# assert_template 'auto_connect_online' | |
| 55 | +# end | |
| 56 | + | |
| 57 | +# should 'auto connect busy if last presence status was dnd' do | |
| 58 | +# create_user('testuser_busy', :last_chat_status => 'dnd') | |
| 59 | +# login_as 'testuser_busy' | |
| 60 | +# | |
| 61 | +# get :index | |
| 62 | +# assert_template 'auto_connect_busy' | |
| 63 | +# end | |
| 64 | 64 | |
| 65 | 65 | begin |
| 66 | 66 | require 'ruby_bosh' |
| ... | ... | @@ -80,18 +80,18 @@ class ChatControllerTest < ActionController::TestCase |
| 80 | 80 | end |
| 81 | 81 | end |
| 82 | 82 | |
| 83 | - should 'render not found if chat feature disabled' do | |
| 84 | - login_as 'testuser' | |
| 85 | - | |
| 86 | - env = Environment.default | |
| 87 | - env.disable('xmpp_chat') | |
| 88 | - env.save! | |
| 89 | - | |
| 90 | - get :index | |
| 91 | - | |
| 92 | - assert_response 404 | |
| 93 | - assert_template 'not_found' | |
| 94 | - end | |
| 83 | +# should 'render not found if chat feature disabled' do | |
| 84 | +# login_as 'testuser' | |
| 85 | +# | |
| 86 | +# env = Environment.default | |
| 87 | +# env.disable('xmpp_chat') | |
| 88 | +# env.save! | |
| 89 | +# | |
| 90 | +# get :index | |
| 91 | +# | |
| 92 | +# assert_response 404 | |
| 93 | +# assert_template 'not_found' | |
| 94 | +# end | |
| 95 | 95 | |
| 96 | 96 | should 'not update presence status from non-ajax requests' do |
| 97 | 97 | @person.user.expects(:update_attributes).never | ... | ... |