Sha256: ee070edbc6aad297a453c747b9540e8bd0bcc580dd600ae186b6191698e798ab

Contents?: true

Size: 592 Bytes

Versions: 8

Compression:

Stored size: 592 Bytes

Contents

require 'minitest_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

8 entries across 7 versions & 1 rubygems

Version Path
commontator-2.0.2 spec/app/models/commontator/subscription_spec.rb
commontator-2.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~
commontator-2.0.1 spec/app/models/commontator/subscription_spec.rb
commontator-2.0.0 spec/app/models/commontator/subscription_spec.rb
commontator-1.1.3 spec/app/models/commontator/subscription_spec.rb
commontator-1.1.2 spec/app/models/commontator/subscription_spec.rb