conversation_participation_test.rb 576 B

12345678910111213141516171819202122
  1. require 'test_helper'
  2. class ConversationParticipationTest < ActiveSupport::TestCase
  3. def setup
  4. @participation = ConversationParticipation.new(user_id: users(:daniel).id,
  5. conversation_id: conversations(:two).id)
  6. end
  7. test "should be valid" do
  8. assert @participation.valid?
  9. end
  10. test "should require a user_id" do
  11. @participation.user_id = nil
  12. assert_not @participation.valid?
  13. end
  14. test "should require a conversation_id" do
  15. @participation.conversation_id = nil
  16. assert_not @participation.valid?
  17. end
  18. end