Sha256: 94f0a8a03a0fd5ea34ca1eebe48c07c7bb4bfa16e981d8706bc727224c4f0214

Contents?: true

Size: 520 Bytes

Versions: 5

Compression:

Stored size: 520 Bytes

Contents

require 'spec_helper'

module Ddr
  module Alerts

    RSpec.describe Message, type: :model do

      context "scopes" do
        context "active" do
          let(:active_msg) { FactoryGirl.create(:message, :active) }
          let(:inactive_msg) { FactoryGirl.create(:message, :inactive) }
          it "should return the correct entries" do
            expect(Message.active).to include(active_msg)
            expect(Message.active).to_not include(inactive_msg)
          end
        end
      end
    end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ddr-alerts-2.0.0 spec/models/message_spec.rb
ddr-alerts-2.0.0.rc1 spec/models/message_spec.rb
ddr-alerts-1.1.0 spec/models/message_spec.rb
ddr-alerts-1.1.0.rc1 spec/models/message_spec.rb
ddr-alerts-1.0.0 spec/models/message_spec.rb