Sha256: eb961e3eadc18d9340da8173f3a28d4a16bf480b171d43a6869ab300315c19f5

Contents?: true

Size: 588 Bytes

Versions: 15

Compression:

Stored size: 588 Bytes

Contents

require 'test_helper'

module Commontator
  describe Subscription do
    before do
      setup_model_spec
      @subscription = Subscription.new
      @subscription.thread = @thread
      @subscription.subscriber = @user
    end
    
    it 'must count unread comments' do
      @subscription.unread.must_equal 0
      
      @subscription.add_unread
      
      @subscription.unread.must_equal 1
      
      @subscription.add_unread
      
      @subscription.unread.must_equal 2
      
      @subscription.mark_as_read
      
      @subscription.unread.must_equal 0
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
commontator-4.5.4 spec/app/models/commontator/subscription_spec.rb
commontator-4.5.3 spec/app/models/commontator/subscription_spec.rb
commontator-4.5.2 spec/app/models/commontator/subscription_spec.rb
commontator-4.5.1 spec/app/models/commontator/subscription_spec.rb
commontator-4.5.0 spec/app/models/commontator/subscription_spec.rb
commontator-4.4.1 spec/app/models/commontator/subscription_spec.rb
commontator-4.3.0 spec/app/models/commontator/subscription_spec.rb
commontator-4.2.2 spec/app/models/commontator/subscription_spec.rb
commontator-4.2.1 spec/app/models/commontator/subscription_spec.rb
commontator-4.2.0 spec/app/models/commontator/subscription_spec.rb
commontator-4.1.2 spec/app/models/commontator/subscription_spec.rb
commontator-4.1.1 spec/app/models/commontator/subscription_spec.rb
commontator-4.0.2 spec/app/models/commontator/subscription_spec.rb
commontator-4.0.1 spec/app/models/commontator/subscription_spec.rb
commontator-4.0.0 spec/app/models/commontator/subscription_spec.rb