Sha256: 22053410bb5ba1f1f21b3c1c62e24cc51dc903cec87ea867de7e276d401f03a2

Contents?: true

Size: 371 Bytes

Versions: 8

Compression:

Stored size: 371 Bytes

Contents

require 'test_helper'

class SubscriptionTest < ActiveSupport::TestCase

  test 'one subscription per user per thread' do
    u = FactoryGirl.create(:user)
    ct = FactoryGirl.create(:thread)
    cts0 = Subscription.create(:user => u, :thread => ct)
    cts1 = Subscription.new(:user => u, :thread => ct)
    assert !cts1.save
    cts0.destroy
    cts1.save!
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
commontator-0.5.14 test/unit/subscription_test.rb
commontator-0.5.13 test/unit/subscription_test.rb
commontator-0.5.12 test/unit/subscription_test.rb
commontator-0.4.1 test/unit/subscription_test.rb
commontator-0.3.10 test/unit/subscription_test.rb
commontator-0.2.4 test/unit/subscription_test.rb
commontator-0.2.0 test/unit/subscription_test.rb
commontator-0.1.46 test/unit/subscription_test.rb