docbrown/spec/models/message_spec.rb
Mac Siri b4292ade33 Implement chatroom (#308)
* Fix multiple chat loading bug

* Open profile links in chat via new tab

* Add unmount handling for chat

* Add overscroll property to chat

* Add channel_name to ChatChannel model

* Create route and page for chatroom WIP

* Expose ChatChannel id to live page

* Implement multichannel support WIP

* Implement chatroom page WIP

* Add css for chatroom

* Update chat's moderation

* Refactor chat's message type

* Swap the use of :message_markdown & :message_html

* Add channel permissions WIP

* Fix failing specs

* Adjust json reponses

* Add empty message prevention

* Update participant error message

* Change Workshop channel to General
2018-05-14 12:50:32 -04:00

12 lines
380 B
Ruby

require "rails_helper"
RSpec.describe Message, type: :model do
describe "validations" do
subject { build(:message, :ignore_after_callback)}
it { is_expected.to belong_to(:user) }
it { is_expected.to belong_to(:chat_channel) }
it { is_expected.to validate_presence_of(:message_html) }
it { is_expected.to validate_presence_of(:message_markdown) }
end
end