Sha256: 8a518cb493d5f4bc25d33935fef7a5fe964142a2fa2c1e0413891fbe0b5495f6

Contents?: true

Size: 898 Bytes

Versions: 8

Compression:

Stored size: 898 Bytes

Contents

require 'rails_helper'

module MessageTrain
  RSpec.describe Ignore do
    describe 'Model' do
      it { should belong_to :conversation }
      it { should belong_to :participant }
      it { should validate_presence_of :conversation }
      it { should validate_presence_of :participant }
    end
    describe 'Scopes and Methods' do
      include_context 'loaded site'
      describe '.find_all_by_participant' do
        subject { ignored_conversation.ignores.find_all_by_participant(first_user) }
        its(:first) { should be_a MessageTrain::Ignore }
      end
      describe '.conversation_ids' do
        subject { MessageTrain::Ignore.conversation_ids }
        it { should include ignored_conversation.id }
      end
      describe '.conversations' do
        subject { MessageTrain::Ignore.conversations }
        it { should include ignored_conversation }
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
message_train-0.1.7 spec/models/message_train/ignore_spec.rb
message_train-0.1.6 spec/models/message_train/ignore_spec.rb
message_train-0.1.5 spec/models/message_train/ignore_spec.rb
message_train-0.1.4 spec/models/message_train/ignore_spec.rb
message_train-0.1.3 spec/models/message_train/ignore_spec.rb
message_train-0.1.2 spec/models/message_train/ignore_spec.rb
message_train-0.1.1 spec/models/message_train/ignore_spec.rb
message_train-0.1.0 spec/models/message_train/ignore_spec.rb