conversations_controller_test.rb 354 B

1234567891011121314
  1. require 'test_helper'
  2. class ConversationsControllerTest < ActionDispatch::IntegrationTest
  3. def setup
  4. @user = users(:daniel)
  5. @other_user = users(:ben)
  6. log_in_as @user
  7. end
  8. test "should redirect conversation which user is not participating in" do
  9. get conversation_path conversations(:two)
  10. assert_redirected_to root_path
  11. end
  12. end